summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-03-25 13:26:18 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-03-27 12:39:35 -0400
commit415320fc14eca40b564d1797e68895d15b51ac49 (patch)
treee5c6c7284b8976dfbea4bcfae8960544b30bf5cf /fs/nfs
parent81b79afb504870a31ee1f764e81a202685cde795 (diff)
downloadblackbird-op-linux-415320fc14eca40b564d1797e68895d15b51ac49.tar.gz
blackbird-op-linux-415320fc14eca40b564d1797e68895d15b51ac49.zip
NFSv4: Return the delegation before returning the layout in evict_inode()
Minor optimisation for the case where the layout has return-on-close enabled. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c
index 75090feeafad..d91898193b2f 100644
--- a/fs/nfs/nfs4super.c
+++ b/fs/nfs/nfs4super.c
@@ -91,10 +91,11 @@ static void nfs4_evict_inode(struct inode *inode)
{
truncate_inode_pages_final(&inode->i_data);
clear_inode(inode);
- pnfs_return_layout(inode);
- pnfs_destroy_layout(NFS_I(inode));
/* If we are holding a delegation, return it! */
nfs_inode_return_delegation_noreclaim(inode);
+ /* Note that above delegreturn would trigger pnfs return-on-close */
+ pnfs_return_layout(inode);
+ pnfs_destroy_layout(NFS_I(inode));
/* First call standard NFS clear_inode() code */
nfs_clear_inode(inode);
}
OpenPOWER on IntegriCloud