summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-01-06 12:36:23 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-06 20:46:31 +0100
commit4541d16c024ce40a0781e03c185ecdfe34aec46f (patch)
tree53574211b3de874869b09644b8de872ccf2d4fe1 /fs/nfs/inode.c
parentpnfs: change layout state seqlock to a spinlock (diff)
downloadlinux-4541d16c024ce40a0781e03c185ecdfe34aec46f.tar.xz
linux-4541d16c024ce40a0781e03c185ecdfe34aec46f.zip
pnfs: change how lsegs are removed from layout list
This is to prepare the way for sensible io draining. Instead of just removing the lseg from the list, we instead clear the VALID flag (preventing new io from grabbing references to the lseg) and remove the reference holding it in the list. Thus the lseg will be removed once any io in progress completes and any references still held are dropped. Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c7782b278e8b..790b786e1ae1 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1410,9 +1410,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
*/
void nfs4_evict_inode(struct inode *inode)
{
+ pnfs_destroy_layout(NFS_I(inode));
truncate_inode_pages(&inode->i_data, 0);
end_writeback(inode);
- pnfs_destroy_layout(NFS_I(inode));
/* If we are holding a delegation, return it! */
nfs_inode_return_delegation_noreclaim(inode);
/* First call standard NFS clear_inode() code */