diff -drupN a/fs/fuse/dev.c b/fs/fuse/dev.c --- a/fs/fuse/dev.c 2018-08-06 17:23:04.000000000 +0300 +++ b/fs/fuse/dev.c 2022-06-12 05:28:14.000000000 +0300 @@ -13,12 +13,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -453,7 +455,9 @@ static void request_wait_answer(struct f * Either request is already in userspace, or it was forced. * Wait it out. */ - wait_event(req->waitq, test_bit(FR_FINISHED, &req->flags)); + while (!test_bit(FR_FINISHED, &req->flags)) + wait_event_freezable(req->waitq, + test_bit(FR_FINISHED, &req->flags)); } static void __fuse_request_send(struct fuse_conn *fc, struct fuse_req *req) @@ -1880,6 +1884,12 @@ static ssize_t fuse_dev_do_write(struct cs->move_pages = 0; err = copy_out_args(cs, &req->out, nbytes); + if (req->in.h.opcode == FUSE_CANONICAL_PATH) { + char *path = (char *)req->out.args[0].value; + + path[req->out.args[0].size - 1] = 0; + req->out.h.error = kern_path(path, 0, req->canonical_path); + } fuse_copy_finish(cs); spin_lock(&fpq->lock);