NFS: Optimise away nfs_check_inode_attributes() when holding a delegation
We already know that the attribute cache is valid.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index fed27c0..81946e7 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -955,6 +955,8 @@
unsigned long invalid = 0;
+ if (nfs_have_delegated_attributes(inode))
+ return 0;
/* Has the inode gone and changed behind our back? */
if ((fattr->valid & NFS_ATTR_FATTR_FILEID) && nfsi->fileid != fattr->fileid)
return -EIO;