The commit is pushed to "branch-rh10-6.12.0-211.30.1.14.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-211.30.1.14.1.vz10
------>
commit 70e0961a75bc8fb1db8b1746b76080533f73a599
Author: Liu Kui <[email protected]>
Date: Wed Jul 1 14:34:39 2026 +0800
fs/fuse: remove the WARN_ON_ONCE() in fuse_revoke_readpages()
A revoked page-cache read stays on ff->revoke_list until it completes.
It's possible and legitimate that a second invalidation of the same
inode is issued before a reply to the revoked read by userspace, so
so drop the bogus WARN_ON_ONCE() and just skip it.
https://virtuozzo.atlassian.net/browse/VSTOR-136315
Signed-off-by: Liu Kui <[email protected]>
Acked-by: Alexey Kuznetsov <[email protected]>
---
fs/fuse/file.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index f77c784b938f5..c96a631b95292 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1276,11 +1276,15 @@ void fuse_revoke_readpages(struct fuse_file *ff)
spin_lock(&ff->lock);
/* revoke all pending read issued from page cache */
list_for_each_entry(ia, &ff->revoke_list, revoke_entry) {
- /* this should never happen unless userspace misbehaves */
- if (unlikely(ia->ap.args.killed)) {
- WARN_ON_ONCE(1);
+ /*
+ * Already revoked by a previous invalidation and not yet
completed,
+ * its pages are already unlocked and its completion callback
will
+ * remove it from the list. This is a normal condition when the
same
+ * inode is invalidated more than once while a read is still
outstanding,
+ * so just skip it.
+ */
+ if (ia->ap.args.killed)
continue;
- }
ia->ap.args.killed = 1;
for (i = 0; i < ia->ap.num_pages; i++)
unlock_page(ia->ap.pages[i]);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel