]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
fuse2fs: don't run fallible operations in op_init
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Aug 2025 21:18:33 +0000 (14:18 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 21 Aug 2025 00:00:54 +0000 (17:00 -0700)
commita78c7ad99ee036218762a69e7736e2e5163cf8ac
tree0e9844b057992760afb6ea526b9fd30434031bab
parent10684aec06a156122da67a7c58332dd00aacac8c
fuse2fs: don't run fallible operations in op_init

There's no way to return an error from the op_init function and have
libfuse tear down the mount, aside from calling fuse_session_exit and
aborting the program.  Even that's not useful, because libfuse has
already daemonized us at that point, so the error messages are screamed
into a void.

Move the code that clears the VALID_FS bit to main() so that we can
abort the mount with a useful error message if that write fails.

Cc: <linux-ext4@vger.kernel.org> # v1.43
Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
misc/fuse2fs.c