From: Trond Myklebust Date: Sun, 29 Apr 2012 16:30:19 +0000 (-0400) Subject: NFS: Optimise away nfs_check_inode_attributes() when holding a delegation X-Git-Tag: v3.5-rc1~52^2~99 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=01da47bde78ff2149f6546a0f17e25983aaddd7b;p=~emulex%2Finfiniband.git 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 --- diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index fed27c0d1a4..81946e77647 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -955,6 +955,8 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat 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;