summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-02-27 01:54:58 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-03-02 07:23:06 +0300
commit8f8ba1d739b7047e2e1d91735716af2799ff2b1e (patch)
tree6a7269e0795220ed360a142bf3ad1901f1cb6822 /fs
parenta08a8cd375db9769588257e7782f6b6b68561b88 (diff)
downloadlinux-8f8ba1d739b7047e2e1d91735716af2799ff2b1e.tar.xz
NFSv4: Add attribute update barriers to delegreturn and pNFS layoutcommit
Ensure that other operations that race with delegreturn and layoutcommit cannot revert the attribute updates that were made on the server. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Tested-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index ff9a6795da46..cd094d652199 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1555,6 +1555,7 @@ int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fa
int status;
spin_lock(&inode->i_lock);
+ nfs_fattr_set_barrier(fattr);
status = nfs_post_op_update_inode_force_wcc_locked(inode, fattr);
spin_unlock(&inode->i_lock);
return status;