From 75b0bd7f6a0e10669b999089ed77cc5711ef6993 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sun, 25 Feb 2018 23:32:34 +0100 Subject: 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 --- short/short.c | 4 ++-- 1 file 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); } -- cgit v1.2.1-18-gbd029