All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Liu Kui <kui.liu@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: azaitsev@virtuozzo.com, devel@openvz.org,
	Liu Kui <kui.liu@virtuozzo.com>
Subject: [Devel] [PATCH hci-8.0] fs/fuse: wake close_wait waiters when fuse_writepage_locked() bails out
Date: Thu, 24 Sep 2026 12:05:41 +0800	[thread overview]
Message-ID: <20260924-vstor-145614-wpl-fix-v1-1-aba86330d06c@virtuozzo.com> (raw)

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@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@virtuozzo.com>

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

             reply	other threads:[~2026-09-24  4:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  4:05 Liu Kui [this message]
2026-09-24 11:21 ` Konstantin Khorenko
2026-09-24 11:33 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260924-vstor-145614-wpl-fix-v1-1-aba86330d06c@virtuozzo.com \
    --to=kui.liu@virtuozzo.com \
    --cc=azaitsev@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.