Whamcloud - gitweb
LU-2388 statahead: don't statahead if it's stopped
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index a424766..c8f0f3b 100644 (file)
@@ -1110,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;
 }
 
@@ -1297,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"