diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-06 14:29:30 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-06 14:29:30 -0500 |
commit | 66d76118714cb627298a72ad6d9b7830f657164b (patch) | |
tree | 8a1e0df7a1ac8e08cf64822478f23fd5973863c6 | |
parent | 44daa79fafb31235f39f1102a7f724b40e5376c0 (diff) |
bcachefs: Fix setting of attributes mask in getattr
Discovered by xfstests generic/553
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/fs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 7d3d5c2045b3..cd3540d092f9 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -753,10 +753,15 @@ static int bch2_getattr(const struct path *path, struct kstat *stat, 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; } |