[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250717145910.GH2672022@frogsfrogsfrogs>
Date: Thu, 17 Jul 2025 07:59:10 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 13/8] fuse2fs: fix ST_RDONLY setting
From: Darrick J. Wong <djwong@...nel.org>
Only set ST_RDONLY if the filesystem isn't writable.
Cc: <linux-ext4@...r.kernel.org> # v1.43
Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs")
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
misc/fuse2fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index bc9fed6f4a8525..bff303a10e7186 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -2775,7 +2775,7 @@ static int op_statfs(const char *path EXT2FS_ATTR((unused)),
fsid ^= *f;
buf->f_fsid = fsid;
buf->f_flag = 0;
- if (fs->flags & EXT2_FLAG_RW)
+ if (!(fs->flags & EXT2_FLAG_RW))
buf->f_flag |= ST_RDONLY;
buf->f_namemax = EXT2_NAME_LEN;
pthread_mutex_unlock(&ff->bfl);
Powered by blists - more mailing lists