mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-16 16:37:37 +07:00
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>
This commit is contained in:
parent
81b79afb50
commit
415320fc14
@ -91,10 +91,11 @@ static void nfs4_evict_inode(struct inode *inode)
|
|||||||
{
|
{
|
||||||
truncate_inode_pages_final(&inode->i_data);
|
truncate_inode_pages_final(&inode->i_data);
|
||||||
clear_inode(inode);
|
clear_inode(inode);
|
||||||
pnfs_return_layout(inode);
|
|
||||||
pnfs_destroy_layout(NFS_I(inode));
|
|
||||||
/* If we are holding a delegation, return it! */
|
/* If we are holding a delegation, return it! */
|
||||||
nfs_inode_return_delegation_noreclaim(inode);
|
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 */
|
/* First call standard NFS clear_inode() code */
|
||||||
nfs_clear_inode(inode);
|
nfs_clear_inode(inode);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user