Whamcloud - gitweb
LU-2388 statahead: don't statahead if it's stopped
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index 2623e38..c8f0f3b 100644 (file)
@@ -820,10 +820,14 @@ void ll_umount_begin(struct vfsmount *vfsmnt, int flags);
 void ll_umount_begin(struct super_block *sb);
 #endif
 int ll_remount_fs(struct super_block *sb, int *flags, char *data);
+#ifdef HAVE_SUPEROPS_USE_DENTRY
+int ll_show_options(struct seq_file *seq, struct dentry *dentry);
+#else
 int ll_show_options(struct seq_file *seq, struct vfsmount *vfs);
+#endif
 void ll_dirty_page_discard_warn(cfs_page_t *page, int ioret);
 int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
-                  struct super_block *);
+                 struct super_block *);
 void lustre_dump_dentry(struct dentry *, int recur);
 void lustre_dump_inode(struct inode *);
 int ll_obd_statfs(struct inode *inode, void *arg);
@@ -1106,9 +1110,10 @@ static inline struct obd_export *ll_i2mdexp(struct inode *inode)
 static inline struct lu_fid *ll_inode2fid(struct inode *inode)
 {
         struct lu_fid *fid;
+
         LASSERT(inode != NULL);
         fid = &ll_i2info(inode)->lli_fid;
-        LASSERT(fid_is_igif(fid) || fid_ver(fid) == 0);
+
         return fid;
 }
 
@@ -1293,6 +1298,10 @@ ll_statahead_enter(struct inode *dir, struct dentry **dentryp, int only_unplug)
         if (lli->lli_opendir_pid != cfs_curproc_pid())
                 return -EAGAIN;
 
+       /* statahead has been stopped */
+       if (lli->lli_opendir_key == NULL)
+               return -EAGAIN;
+
         ldd = ll_d2d(*dentryp);
         /*
          * When stats a dentry, the system trigger more than once "revalidate"