From 4a1d8d3efcdedd0911941f236b2e3a6347f518c3 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 6 Nov 2019 14:29:30 -0500 Subject: [PATCH] bcachefs: Fix setting of attributes mask in getattr Discovered by xfstests generic/553 Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/fs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 65556993bbb9a..b241164f6f7e1 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; } -- 2.47.2