[Devel] [PATCH hci-8.0] fs/fuse: wake close_wait waiters when fuse_writepage_locked() bails out

Liu Kui kui.liu at virtuozzo.com
Thu Sep 24 07:05:41 MSK 2026


The error path of fuse_writepage_locked() drops the fuse file
reference with a bare fuse_file_put(), which does not wake up the
releaser waiting on fi->page_waitq for ff->count to drain on
close_wait, so fuse_release() can hang. Use fuse_release_ff() instead.

https://virtuozzo.atlassian.net/browse/VSTOR-145614

Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
---
Follow-up to the series "fs/fuse: unify dropping the fuse file
reference of a writeback request": the error path of
fuse_writepage_locked() has the same problem class and was missed
there. The fix is independent and applies directly to hci-8.0, with
or without that series.

https://virtuozzo.atlassian.net/browse/VSTOR-145614
---
 fs/fuse/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 0a7c6d03b13d..e0efb524cda7 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2572,7 +2572,7 @@ static int fuse_writepage_locked(struct folio *folio)
 	return 0;
 
 err_writepage_args:
-	fuse_file_put(ff, false);
+	fuse_release_ff(inode, ff);
 err_nofile:
 	folio_put(tmp_folio);
 err:

---
base-commit: ee4c1d8857379d0045211315e81dd5aea3a3e55b
change-id: 20260924-vstor-145614-wpl-fix-51e2654921f2

Best regards,
--  
Liu Kui <kui.liu at virtuozzo.com>



More information about the Devel mailing list