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

Maxim Patlasov mpatlasov at virtuozzo.com
Fri Dec 2 17:34:10 PST 2016


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 at virtuozzo.com>
---
 fs/fuse/file.c |    7 -------
 1 file changed, 7 deletions(-)

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)



More information about the Devel mailing list