From 5da417890577f7c173906bc19246ea302a9c83c4 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 27 Aug 2015 18:19:55 -0400 Subject: [PATCH] LU-6215 llite: file->f_dentry no longer exist In newer kernels file->f_dentry no long exist. Convert the recent changes that used file->f_dentry to use the proper file_path.dentry. This time add a checkpatch warning so this can be avoided in the future. Change-Id: I5b0c54f3fd80d548c5fa527a3edf95ef03f97122 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/16119 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: frank zago Reviewed-by: Oleg Drokin --- contrib/scripts/checkpatch.pl | 1 + lustre/llite/file.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl index f7695a5..8e4cbb6 100755 --- a/contrib/scripts/checkpatch.pl +++ b/contrib/scripts/checkpatch.pl @@ -460,6 +460,7 @@ my %dep_functions = ( 'strcat', 'strncat', 'tempnam', 'mkstemp', 'OBD_FREE_LARGE', 'OBD_FREE', + 'f_dentry', 'f_path.dentry', ); my @rawlines = (); diff --git a/lustre/llite/file.c b/lustre/llite/file.c index c81ff8b..7ddd6d1 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -2177,7 +2177,7 @@ static inline long ll_lease_type_from_fmode(fmode_t fmode) static int ll_file_futimes_3(struct file *file, const struct ll_futimes_3 *lfu) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; struct iattr ia = { .ia_valid = ATTR_ATIME | ATTR_ATIME_SET | ATTR_MTIME | ATTR_MTIME_SET | @@ -2205,7 +2205,7 @@ static int ll_file_futimes_3(struct file *file, const struct ll_futimes_3 *lfu) RETURN(-EINVAL); mutex_lock(&inode->i_mutex); - rc = ll_setattr_raw(file->f_dentry, &ia, false); + rc = ll_setattr_raw(file->f_path.dentry, &ia, false); mutex_unlock(&inode->i_mutex); RETURN(rc); -- 1.8.3.1