From: James Simmons Date: Thu, 27 Aug 2015 22:19:55 +0000 (-0400) Subject: LU-6215 llite: file->f_dentry no longer exist X-Git-Tag: 2.7.60~53 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F16119%2F2;p=fs%2Flustre-release.git 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 --- 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);