]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfs/internal.h
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / fs / nfs / internal.h
index 17f082442804a0bbf19da2e5a7d7c0ff711d2400..f80c47d5ff277203b19344b33ba51c19a46fcf5e 100644 (file)
@@ -33,6 +33,15 @@ static inline int nfs_attr_use_mounted_on_fileid(struct nfs_fattr *fattr)
        return 1;
 }
 
+static inline bool nfs_lookup_is_soft_revalidate(const struct dentry *dentry)
+{
+       if (!(NFS_SB(dentry->d_sb)->flags & NFS_MOUNT_SOFTREVAL))
+               return false;
+       if (!d_is_positive(dentry) || !NFS_FH(d_inode(dentry))->size)
+               return false;
+       return true;
+}
+
 /*
  * Note: RFC 1813 doesn't limit the number of auth flavors that
  * a server can return, so make something up.