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

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 5 00:35:42 PST 2016


The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.36.1.vz7.20.10
------>
commit 97825f6e3a3da5160d57663b0dcb83f942ca67c5
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date:   Mon Dec 5 12:35:42 2016 +0400

    fuse: fuse_prepare_write() should not wait on fuse-writeback
    
    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 52bca91..641b570 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2328,13 +2328,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