summaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index be806ead7f4d..5166adcfc0fb 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -721,14 +721,12 @@ int nfs_async_inode_return_delegation(struct inode *inode,
721 struct nfs_client *clp = server->nfs_client; 721 struct nfs_client *clp = server->nfs_client;
722 struct nfs_delegation *delegation; 722 struct nfs_delegation *delegation;
723 723
724 filemap_flush(inode->i_mapping);
725
726 rcu_read_lock(); 724 rcu_read_lock();
727 delegation = rcu_dereference(NFS_I(inode)->delegation); 725 delegation = rcu_dereference(NFS_I(inode)->delegation);
728 if (delegation == NULL) 726 if (delegation == NULL)
729 goto out_enoent; 727 goto out_enoent;
730 728 if (stateid != NULL &&
731 if (!clp->cl_mvops->match_stateid(&delegation->stateid, stateid)) 729 !clp->cl_mvops->match_stateid(&delegation->stateid, stateid))
732 goto out_enoent; 730 goto out_enoent;
733 nfs_mark_return_delegation(server, delegation); 731 nfs_mark_return_delegation(server, delegation);
734 rcu_read_unlock(); 732 rcu_read_unlock();