summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-11-06 14:29:30 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:31 -0400
commit4a1d8d3efcdedd0911941f236b2e3a6347f518c3 (patch)
tree68e86b30009b8504e0e07573aea2a9e9629a56bb /fs/bcachefs/fs.c
parenta023127a28d4b8d651d3ccb41dd7da2ba534390a (diff)
downloadlwn-4a1d8d3efcdedd0911941f236b2e3a6347f518c3.tar.gz
lwn-4a1d8d3efcdedd0911941f236b2e3a6347f518c3.zip
bcachefs: Fix setting of attributes mask in getattr
Discovered by xfstests generic/553 Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r--fs/bcachefs/fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 65556993bbb9..b241164f6f7e 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -775,10 +775,15 @@ static int bch2_getattr(struct mnt_idmap *idmap,
if (inode->ei_inode.bi_flags & BCH_INODE_IMMUTABLE)
stat->attributes |= STATX_ATTR_IMMUTABLE;
+ stat->attributes_mask |= STATX_ATTR_IMMUTABLE;
+
if (inode->ei_inode.bi_flags & BCH_INODE_APPEND)
stat->attributes |= STATX_ATTR_APPEND;
+ stat->attributes_mask |= STATX_ATTR_APPEND;
+
if (inode->ei_inode.bi_flags & BCH_INODE_NODUMP)
stat->attributes |= STATX_ATTR_NODUMP;
+ stat->attributes_mask |= STATX_ATTR_NODUMP;
return 0;
}