NFS: Fix nfs_post_op_update_inode() to set an attribute barrier
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 27 Feb 2015 00:48:26 +0000 (19:48 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 2 Mar 2015 04:23:06 +0000 (23:23 -0500)
nfs_post_op_update_inode() is called after a self-induced attribute
update. Ensure that it also sets the barrier.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfs/inode.c

index fef65d1e024e4c5423efec23cc09fcbee602472a..c66c1df467f4a51970ffd2c2a21b58867c26c3b0 100644 (file)
@@ -1475,6 +1475,7 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        int status;
 
        spin_lock(&inode->i_lock);
+       nfs_fattr_set_barrier(fattr);
        status = nfs_post_op_update_inode_locked(inode, fattr);
        spin_unlock(&inode->i_lock);