[Devel] [PATCH VZ9] fs/fuse kio: do not return -EINVAL from fuse_dev_do_write() on killed request.
Liu Kui
kui.liu at virtuozzo.com
Tue Feb 4 11:31:01 MSK 2025
It is a normal scenario that the request may have been killed when a
response is returned. So we shouldn't return -EINVAL to the response
writer, just need to complete the request with error. Otherwise it
breaks the userspace thread.
Related to #VSTOR-98704
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
---
fs/fuse/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 101bd4907828..cc6b9f348cf6 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -2339,7 +2339,8 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
cs->move_pages = 0;
if (req->args->killed) {
- err = -EINVAL;
+ err = 0;
+ req->out.h.error = -EIO;
} else if (oh.error == FUSE_OUT_SPLICES) {
req->out.h.error = 0;
err = copy_out_splices(cs, req->args, nbytes);
--
2.39.5 (Apple Git-154)
More information about the Devel
mailing list