summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorDavid Howells2017-03-31 19:32:17 +0200
committerAl Viro2017-04-03 07:06:00 +0200
commit3209f68b3ca4667069923a325c88b21131bfdf9f (patch)
tree28807921a600cc5fd1ede24fcac669f0f0b2e994 /fs/ext4
parentstatx: Reserve the top bit of the mask for future struct expansion (diff)
downloadkernel-qcow2-linux-3209f68b3ca4667069923a325c88b21131bfdf9f.tar.gz
kernel-qcow2-linux-3209f68b3ca4667069923a325c88b21131bfdf9f.tar.xz
kernel-qcow2-linux-3209f68b3ca4667069923a325c88b21131bfdf9f.zip
statx: Include a mask for stx_attributes in struct statx
Include a mask in struct stat to indicate which bits of stx_attributes the filesystem actually supports. This would also be useful if we add another system call that allows you to do a 'bulk attribute set' and pass in a statx struct with the masks appropriately set to say what you want to set. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 5d02b922afa3..b9ffa9f4191f 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5413,6 +5413,12 @@ int ext4_getattr(const struct path *path, struct kstat *stat,
if (flags & EXT4_NODUMP_FL)
stat->attributes |= STATX_ATTR_NODUMP;
+ stat->attributes_mask |= (STATX_ATTR_APPEND |
+ STATX_ATTR_COMPRESSED |
+ STATX_ATTR_ENCRYPTED |
+ STATX_ATTR_IMMUTABLE |
+ STATX_ATTR_NODUMP);
+
generic_fillattr(inode, stat);
return 0;
}