From: Trond Myklebust Date: Wed, 25 Mar 2015 17:26:18 +0000 (-0400) Subject: NFSv4: Return the delegation before returning the layout in evict_inode() X-Git-Tag: v4.14-rc1~5470^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=415320fc14eca40b564d1797e68895d15b51ac49;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 75090fe..d918981 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); }