[Devel,vz7] fuse: fuse_prepare_write() should not wait on fuse-writeback

Submitted by Maxim Patlasov on Dec. 3, 2016, 1:34 a.m.

Details

Message ID 148072884478.12635.14321088249545159522.stgit@maxim-thinkpad
State New
Series "fuse: fuse_prepare_write() should not wait on fuse-writeback"
Headers show

Commit Message

Maxim Patlasov Dec. 3, 2016, 1:34 a.m.
The patch fixes a silly mistake: when fuse_prepare_write() calls
__fuse_readpage(), the latter will do fuse_wait_on_page_writeback_or_invalidate
anyway, so explicit fuse_wait_on_page_writeback is redundant.

That silly mistake resulted in deadlock because, fuse_prepare_write
used fuse_wait_on_page_writeback instead od smarter
fuse_wait_on_page_writeback_or_invalidate.

https://jira.sw.ru/browse/PSBM-56474

Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
---
 fs/fuse/file.c |    7 -------
 1 file changed, 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e5c4778..4fcf4f4 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2280,13 +2280,6 @@  static int fuse_prepare_write(struct fuse_conn *fc, struct file *file,
 		return 0;
 	}
 
-	/*
-	 * Page writeback can extend beyond the liftime of the
-	 * page-cache page, so make sure we read a properly synced
-	 * page.
-	 */
-	fuse_wait_on_page_writeback(page->mapping->host, page->index);
-
 	num_read = __fuse_readpage(file, page, page_len, &err, &req, NULL,
 				   NULL);
 	if (req)