Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8011d93 authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o
Browse files

ext4: add EXT4_JOURNAL_DATA_FL and EXT4_EXTENTS_FL to modifiable mask



Add EXT4_JOURNAL_DATA_FL and EXT4_EXTENTS_FL to EXT4_FL_USER_MODIFIABLE
to recognize that they are modifiable by userspace. So far we got away
without having them there because ext4_ioctl_setflags() treats them in a
special way. But it was really confusing like that.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 9060dd2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ struct flex_groups {
#define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */

#define EXT4_FL_USER_VISIBLE		0x304BDFFF /* User visible flags */
#define EXT4_FL_USER_MODIFIABLE		0x204380FF /* User modifiable flags */
#define EXT4_FL_USER_MODIFIABLE		0x204BC0FF /* User modifiable flags */

#define EXT4_FL_XFLAG_VISIBLE		(EXT4_SYNC_FL | \
					 EXT4_IMMUTABLE_FL | \
+3 −0
Original line number Diff line number Diff line
@@ -268,6 +268,9 @@ static int ext4_ioctl_setflags(struct inode *inode,
	for (i = 0, mask = 1; i < 32; i++, mask <<= 1) {
		if (!(mask & EXT4_FL_USER_MODIFIABLE))
			continue;
		/* These flags get special treatment later */
		if (mask == EXT4_JOURNAL_DATA_FL || mask == EXT4_EXTENTS_FL)
			continue;
		if (mask & flags)
			ext4_set_inode_flag(inode, i);
		else