Skip to content

Commit

Permalink
ext4: support STATX_ATTR_VERITY
Browse files Browse the repository at this point in the history
Set the STATX_ATTR_VERITY bit when the statx() system call is used on a
verity file on ext4.

Reviewed-by: Andreas Dilger <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
  • Loading branch information
ebiggers committed Nov 13, 2019
1 parent 3ad2522 commit 1f60719
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5717,12 +5717,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;
Expand Down

0 comments on commit 1f60719

Please sign in to comment.