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

Commit 20a1619e authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

ext4: support STATX_ATTR_VERITY



Set the STATX_ATTR_VERITY bit when the statx() system call is used on a
verity file on ext4.

Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 1017779f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5686,12 +5686,15 @@ int ext4_getattr(const struct path *path, struct kstat *stat,
		stat->attributes |= STATX_ATTR_IMMUTABLE;
	if (flags & EXT4_NODUMP_FL)
		stat->attributes |= STATX_ATTR_NODUMP;
	if (flags & EXT4_VERITY_FL)
		stat->attributes |= STATX_ATTR_VERITY;

	stat->attributes_mask |= (STATX_ATTR_APPEND |
				  STATX_ATTR_COMPRESSED |
				  STATX_ATTR_ENCRYPTED |
				  STATX_ATTR_IMMUTABLE |
				  STATX_ATTR_NODUMP);
				  STATX_ATTR_NODUMP |
				  STATX_ATTR_VERITY);

	generic_fillattr(inode, stat);
	return 0;