The commit is pushed to "branch-rh9-5.14.0-427.92.1.vz9.88.x-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh9-5.14.0-427.92.1.vz9.88.11
------>
commit f506b9bd8b9201d842c5b38dcfbf239ee124d83c
Author: Liu Kui <[email protected]>
Date: Tue Dec 16 17:25:45 2025 +0800
fs/fuse kio: Set FUSE_S_FAIL_IMMEDIATELY bit on newly opened fuse_file
correctly
When fuse_invalidate_file() is in progress, set the FUSE_S_FAIL_IMMEDIATELY
bit on the newly created fuse_file before adding it to fi->rw_files list.
This prevents the page cache from issuing new read requests with locked
pages during fuse_invalidate_file(), which could otherwise cause a deadlock.
https://virtuozzo.atlassian.net/browse/VSTOR-120952
Signed-off-by: Liu Kui <[email protected]>
Acked-by: Alexey Kuznetsov <[email protected]>
Feature: vStorage
---
fs/fuse/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index b59dacd29a6a7..e804e3c0d6bd4 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -242,6 +242,11 @@ static void fuse_link_file(struct file *file, bool write)
* inodes's write_file list
*/
spin_lock(&fi->lock);
+ if (test_bit(FUSE_I_INVAL_FILES, &fi->state)) {
+ spin_lock(&ff->lock);
+ set_bit(FUSE_S_FAIL_IMMEDIATELY, &ff->ff_state);
+ spin_unlock(&ff->lock);
+ }
if (list_empty(entry))
list_add(entry, list);
spin_unlock(&fi->lock);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel