Przeglądaj źródła

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>
Trond Myklebust 13 lat temu
rodzic
commit
01da47bde7
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      fs/nfs/inode.c

+ 2 - 0
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;
 	unsigned long invalid = 0;
 
 
 
 
+	if (nfs_have_delegated_attributes(inode))
+		return 0;
 	/* Has the inode gone and changed behind our back? */
 	/* Has the inode gone and changed behind our back? */
 	if ((fattr->valid & NFS_ATTR_FATTR_FILEID) && nfsi->fileid != fattr->fileid)
 	if ((fattr->valid & NFS_ATTR_FATTR_FILEID) && nfsi->fileid != fattr->fileid)
 		return -EIO;
 		return -EIO;