[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176246793384.2862036.18356083276939037519.stgit@frogsfrogsfrogs>
Date: Thu, 06 Nov 2025 14:30:48 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 3/4] fuse2fs: quiet down write-protect warning
From: Darrick J. Wong <djwong@...nel.org>
No need to retry the mount with write protection if we already set ro
and cleared EXT2_FLAG_RO.
Fixes: e352b2ad174573 ("fuse2fs: mount norecovery if main block device is readonly")
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
misc/fuse2fs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 7b94f0df1688a1..bbd79d6c09f4bc 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -4823,7 +4823,8 @@ int main(int argc, char *argv[])
flags |= EXT2_FLAG_DIRECT_IO;
err = ext2fs_open2(fctx.device, options, flags, 0, 0, unix_io_manager,
&global_fs);
- if (err == EPERM || err == EACCES) {
+ if ((err == EPERM || err == EACCES) &&
+ (!fctx.ro || (flags & EXT2_FLAG_RW))) {
/*
* Source device cannot be opened for write. Under these
* circumstances, mount(8) will try again with a ro mount,
Powered by blists - more mailing lists