aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-06-23 09:55:48 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-07-05 19:11:05 -0400
commitf508d46ae41a796036aef566637685dbf83b554f (patch)
tree0e3354b3062b422e0c9e4f4465c1a8f6b1fec58a /fs/nfs/file.c
parentf7b5c340aca87d736a6b15aa40bf135f1baab011 (diff)
NFS: Remove redundant waits for O_DIRECT in fsync() and write_begin()
We're now waiting immediately after taking the locks, so waiting in fsync() and write_begin() is either redundant or potentially subject to livelock (if not holding the lock). Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 9f8da9e1b23f..0e9b4a068f13 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -276,7 +276,6 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
276 276
277 trace_nfs_fsync_enter(inode); 277 trace_nfs_fsync_enter(inode);
278 278
279 inode_dio_wait(inode);
280 do { 279 do {
281 ret = filemap_write_and_wait_range(inode->i_mapping, start, end); 280 ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
282 if (ret != 0) 281 if (ret != 0)
@@ -361,11 +360,6 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping,
361 file, mapping->host->i_ino, len, (long long) pos); 360 file, mapping->host->i_ino, len, (long long) pos);
362 361
363start: 362start:
364 /*
365 * Wait for O_DIRECT to complete
366 */
367 inode_dio_wait(mapping->host);
368
369 page = grab_cache_page_write_begin(mapping, index, flags); 363 page = grab_cache_page_write_begin(mapping, index, flags);
370 if (!page) 364 if (!page)
371 return -ENOMEM; 365 return -ENOMEM;