diff mbox series

[11/16] fuse2fs: support changing newer iflags

Message ID 174553065123.1160461.3149004980436873980.stgit@frogsfrogsfrogs
State New
Headers show
Series [01/16] fuse2fs: refuse unsupported features | expand

Commit Message

Darrick J. Wong April 24, 2025, 9:43 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Redefine FUSE2FS_MODIFIABLE_IFLAGS so that userspace can modify any
flags that the kernel can, except for the ones that fuse2fs lacks the
ability to change.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 misc/fuse2fs.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 6066984fa7f6e0..2220da4c3e8f64 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -2954,9 +2954,8 @@  static int op_utimens(const char *path, const struct timespec ctv[2]
 }
 
 #define FUSE2FS_MODIFIABLE_IFLAGS \
-	(EXT2_IMMUTABLE_FL | EXT2_APPEND_FL | EXT2_NODUMP_FL | \
-	 EXT2_NOATIME_FL | EXT3_JOURNAL_DATA_FL | EXT2_DIRSYNC_FL | \
-	 EXT2_TOPDIR_FL)
+	(EXT2_FL_USER_MODIFIABLE & ~(EXT4_EXTENTS_FL | EXT4_CASEFOLD_FL | \
+				     EXT3_JOURNAL_DATA_FL))
 
 static inline int set_iflags(struct ext2_inode_large *inode, __u32 iflags)
 {