Whamcloud - gitweb
LU-6215 kernel: use f_path for inode dentry
[fs/lustre-release.git] / lustre / llite / dir.c
index dbf82b8..fe0d1be 100644 (file)
@@ -325,7 +325,7 @@ static int ll_iterate(struct file *filp, struct dir_context *ctx)
 static int ll_readdir(struct file *filp, void *cookie, filldir_t filldir)
 #endif
 {
-       struct inode            *inode  = filp->f_dentry->d_inode;
+       struct inode            *inode  = filp->f_path.dentry->d_inode;
        struct ll_file_data     *lfd    = LUSTRE_FPRIVATE(filp);
        struct ll_sb_info       *sbi    = ll_i2sbi(inode);
        int                     hash64  = sbi->ll_flags & LL_SBI_64BIT_HASH;
@@ -358,11 +358,11 @@ static int ll_readdir(struct file *filp, void *cookie, filldir_t filldir)
        if (unlikely(op_data->op_mea1 != NULL)) {
                /* This is only needed for striped dir to fill ..,
                 * see lmv_read_entry */
-               if (filp->f_dentry->d_parent != NULL &&
-                   filp->f_dentry->d_parent->d_inode != NULL) {
+               if (filp->f_path.dentry->d_parent != NULL &&
+                   filp->f_path.dentry->d_parent->d_inode != NULL) {
                        __u64 ibits = MDS_INODELOCK_UPDATE;
                        struct inode *parent =
-                               filp->f_dentry->d_parent->d_inode;
+                               filp->f_path.dentry->d_parent->d_inode;
 
                        if (ll_have_md_lock(parent, &ibits, LCK_MINMODE))
                                op_data->op_fid3 = *ll_inode2fid(parent);
@@ -1065,7 +1065,7 @@ ll_getname(const char __user *filename)
 
 static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-        struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
         struct ll_sb_info *sbi = ll_i2sbi(inode);
         struct obd_ioctl_data *data;
         int rc = 0;
@@ -1217,7 +1217,7 @@ lmv_out_free:
                                 RETURN(-EFAULT);
                 }
 
-                if (inode->i_sb->s_root == file->f_dentry)
+               if (inode->i_sb->s_root == file->f_path.dentry)
                         set_default = 1;
 
                 /* in v1 and v3 cases lumv1 points to data */