diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-26 00:23:31 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-27 19:39:37 +0300 |
commit | 9e1681c2e74bdd84bad6f74b47a4d88ad2f433df (patch) | |
tree | 8c515f73cb471a2839876228dad497001d6440f0 /fs/nfs/nfs4file.c | |
parent | d9dabc1a01656868d53a1d08309ca24d922b1376 (diff) | |
download | linux-9e1681c2e74bdd84bad6f74b47a4d88ad2f433df.tar.xz |
NFSv4: Truncating file opens should also sync O_DIRECT writes
We don't just want to sync out buffered writes, but also O_DIRECT ones.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4file.c')
-rw-r--r-- | fs/nfs/nfs4file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 0de62f7cfebf..8da5409e6f1a 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -59,7 +59,7 @@ nfs4_file_open(struct inode *inode, struct file *filp) if (openflags & O_TRUNC) { attr.ia_valid |= ATTR_SIZE; attr.ia_size = 0; - nfs_wb_all(inode); + nfs_sync_inode(inode); } inode = NFS_PROTO(dir)->open_context(dir, ctx, openflags, &attr, &opened); |