summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4file.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-07-14 18:42:40 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-07-14 18:42:40 +0200
commit8b7d9d09b24f4ef16f7ae34b6d9e59857fda0870 (patch)
tree405f45e9ee238e153bf901693e63537d7247f795 /fs/nfs/nfs4file.c
parentNFS nfs_vm_page_mkwrite: Don't freeze me, Bro... (diff)
downloadlinux-8b7d9d09b24f4ef16f7ae34b6d9e59857fda0870.tar.xz
linux-8b7d9d09b24f4ef16f7ae34b6d9e59857fda0870.zip
NFSv4: Revert "Truncating file opens should also sync O_DIRECT writes"
We're not holding any locks, so both nfs_wb_all() and inode_dio_wait() are unenforcible and have livelock potential. Just limit ourselves to flushing out the data. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4file.c')
-rw-r--r--fs/nfs/nfs4file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 7cdc0ab9e6f5..d085ad794884 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -66,7 +66,7 @@ nfs4_file_open(struct inode *inode, struct file *filp)
if (openflags & O_TRUNC) {
attr.ia_valid |= ATTR_SIZE;
attr.ia_size = 0;
- nfs_sync_inode(inode);
+ filemap_write_and_wait(inode->i_mapping);
}
inode = NFS_PROTO(dir)->open_context(dir, ctx, openflags, &attr, NULL);