summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@dowhile0.org>2018-02-25 23:32:34 +0100
committerJavier Martinez Canillas <javier@dowhile0.org>2018-02-25 23:32:36 +0100
commit75b0bd7f6a0e10669b999089ed77cc5711ef6993 (patch)
treeba8d53734fcb341c60c86fd335badda2bdd121d0
parent26acb6fb5d972b5c45980e3298787758854ce499 (diff)
downloadldd3-75b0bd7f6a0e10669b999089ed77cc5711ef6993.tar.gz
short: Use file_dentry() to get struct file's dentry
The struct file doesn't have a struct dentry member anymore, use the macro to get the struct dentry for a struct file. Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
-rw-r--r--short/short.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/short/short.c b/short/short.c
index d372d5a..25ee0da 100644
--- a/short/short.c
+++ b/short/short.c
@@ -189,7 +189,7 @@ ssize_t do_short_read (struct inode *inode, struct file *filp, char __user *buf,
*/
ssize_t short_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
{
- return do_short_read(filp->f_dentry->d_inode, filp, buf, count, f_pos);
+ return do_short_read(file_dentry(filp)->d_inode, filp, buf, count, f_pos);
}
@@ -251,7 +251,7 @@ ssize_t do_short_write (struct inode *inode, struct file *filp, const char __use
ssize_t short_write(struct file *filp, const char __user *buf, size_t count,
loff_t *f_pos)
{
- return do_short_write(filp->f_dentry->d_inode, filp, buf, count, f_pos);
+ return do_short_write(file_dentry(filp)->d_inode, filp, buf, count, f_pos);
}