diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-25 17:23:31 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-27 12:39:37 -0400 |
commit | 9e1681c2e74bdd84bad6f74b47a4d88ad2f433df (patch) | |
tree | 8c515f73cb471a2839876228dad497001d6440f0 /fs/nfs/inode.c | |
parent | d9dabc1a01656868d53a1d08309ca24d922b1376 (diff) |
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/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 60f907666697..f1fc0e4c1c02 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -133,11 +133,12 @@ void nfs_evict_inode(struct inode *inode) | |||
133 | nfs_clear_inode(inode); | 133 | nfs_clear_inode(inode); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int nfs_sync_inode(struct inode *inode) | 136 | int nfs_sync_inode(struct inode *inode) |
137 | { | 137 | { |
138 | nfs_inode_dio_wait(inode); | 138 | nfs_inode_dio_wait(inode); |
139 | return nfs_wb_all(inode); | 139 | return nfs_wb_all(inode); |
140 | } | 140 | } |
141 | EXPORT_SYMBOL_GPL(nfs_sync_inode); | ||
141 | 142 | ||
142 | /** | 143 | /** |
143 | * nfs_sync_mapping - helper to flush all mmapped dirty data to disk | 144 | * nfs_sync_mapping - helper to flush all mmapped dirty data to disk |