]> git.ipfire.org Git - thirdparty/linux.git/commit
fuse: don't require /dev/fuse fd to be kept open during mount
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 11 Mar 2026 21:27:44 +0000 (22:27 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 2 Apr 2026 18:43:25 +0000 (20:43 +0200)
commitd42eb23b2ef9fbe66ea7fd4b3153c3244818d47c
tree024a13ffcc37b1e14f39b1f216ce24e0f00d8345
parente9bf38500ed9aec7cfdf9219c75d353645b41168
fuse: don't require /dev/fuse fd to be kept open during mount

With the new mount API the sequence of syscalls would be:

        fs_fd = fsopen("fuse", 0);
snprintf(opt, sizeof(opt), "%i", devfd);
fsconfig(fs_fd, FSCONFIG_SET_STRING, "fd", opt, 0);
/* ... */
fsconfig(fs_fd, FSCONFIG_CMD_CREATE, 0, 0, 0);

Current mount code just stores the value of devfd in the fs_context and
uses it in during FSCONFIG_CMD_CREATE, which is inelegant.

Instead grab a reference to the underlying fuse_dev, and use that during
the filesystem creation.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/fuse_i.h
fs/fuse/inode.c