projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a773e7
)
NFSv4: Revert "Truncating file opens should also sync O_DIRECT writes"
author
Trond Myklebust
<trond.myklebust@primarydata.com>
Thu, 14 Jul 2016 16:42:40 +0000
(12:42 -0400)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Thu, 14 Jul 2016 16:42:40 +0000
(12:42 -0400)
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>
fs/nfs/nfs4file.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4file.c
b/fs/nfs/nfs4file.c
index 7cdc0ab9e6f5801b2807ea38be8694fafe8f6697..d085ad7948844cb0931125241bf549c915badd93 100644
(file)
--- 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);