Whamcloud - gitweb
LU-6215 llite: file->f_dentry no longer exist 19/16119/2
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 27 Aug 2015 22:19:55 +0000 (18:19 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 Sep 2015 02:45:34 +0000 (02:45 +0000)
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 <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16119
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/scripts/checkpatch.pl
lustre/llite/file.c

index f7695a5..8e4cbb6 100755 (executable)
@@ -460,6 +460,7 @@ my %dep_functions = (
        'strcat',                       'strncat',
        'tempnam',                      'mkstemp',
        'OBD_FREE_LARGE',               'OBD_FREE',
+       'f_dentry',                     'f_path.dentry',
 );
 
 my @rawlines = ();
index c81ff8b..7ddd6d1 100644 (file)
@@ -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);