From: Miklos Szeredi Date: Mon, 1 Sep 2025 15:16:26 +0000 (+0200) Subject: fuse: fix possibly missing fuse_copy_finish() call in fuse_notify() X-Git-Tag: v6.18-rc1~121^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b563aad1c0a05dc7d123f68a9f82f79de206dad;p=thirdparty%2Flinux.git fuse: fix possibly missing fuse_copy_finish() call in fuse_notify() In case of FUSE_NOTIFY_RESEND and FUSE_NOTIFY_INC_EPOCH fuse_copy_finish() isn't called. Fix by always calling fuse_copy_finish() after fuse_notify(). It's a no-op if called a second time. Fixes: 760eac73f9f6 ("fuse: Introduce a new notification type for resend pending requests") Fixes: 2396356a945b ("fuse: add more control over cache invalidation behaviour") Cc: # v6.9 Reviewed-by: Joanne Koong Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index df793003eb0c8..85d05a5e40e99 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2178,7 +2178,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud, */ if (!oh.unique) { err = fuse_notify(fc, oh.error, nbytes - sizeof(oh), cs); - goto out; + goto copy_finish; } err = -EINVAL;