Return code was accidentally set to the result, which can be a positive value with the number of bytes that could not be copied. Set to -EFAULT. Fixes: fuse: Add io-uring sqe commit and fetch support Spotted in review by: Luis Henriques <luis@xxxxxxxxxx> Signed-off-by: Bernd Schubert <bschubert@xxxxxxx> --- fs/fuse/dev_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c index 5f10f3880d5a4869d8a040567025c60e75d962c6..8e15acb3d350d223c64423233f3613b6eee075da 100644 --- a/fs/fuse/dev_uring.c +++ b/fs/fuse/dev_uring.c @@ -779,7 +779,7 @@ static void fuse_uring_commit(struct fuse_ring_ent *ent, err = copy_from_user(&req->out.h, &ent->headers->in_out, sizeof(req->out.h)); if (err) { - req->out.h.error = err; + req->out.h.error = -EFAULT; goto out; } -- 2.43.0