From: Miklos Szeredi Date: Tue, 31 Mar 2026 14:32:21 +0000 (+0200) Subject: fuse: remove fuse_mutex protection from fuse_dev_ioctl_sync_init() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e582371be4a75c461fecb61b98ee391025f91946;p=thirdparty%2Fkernel%2Flinux.git fuse: remove fuse_mutex protection from fuse_dev_ioctl_sync_init() In normal use ioctl(FUSE_DEV_IOC_SYNC_INIT) comes before the mount() or fsconfig() syscalls, they are executed strictly serially. If ioctl and mount are performed in parallel, the behavior is nondeterministic. Removing the mutex does not change this. Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ec2f53b3d2c8d..aab98f75b9dd3 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2310,16 +2310,13 @@ static long fuse_dev_ioctl_backing_close(struct file *file, __u32 __user *argp) static long fuse_dev_ioctl_sync_init(struct file *file) { - int err = -EINVAL; struct fuse_dev *fud = fuse_file_to_fud(file); - mutex_lock(&fuse_mutex); - if (!fuse_dev_chan_get(fud)) { - fud->sync_init = true; - err = 0; - } - mutex_unlock(&fuse_mutex); - return err; + if (fuse_dev_chan_get(fud)) + return -EINVAL; + + fud->sync_init = true; + return 0; } static long fuse_dev_ioctl(struct file *file, unsigned int cmd,