]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Fix setting of attributes mask in getattr
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 6 Nov 2019 19:29:30 +0000 (14:29 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:31 +0000 (17:08 -0400)
Discovered by xfstests generic/553

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c

index 65556993bbb9ae9257eb7c75ad9d5ea9d919fa50..b241164f6f7e154f35cd04db8cd162a355f2e04e 100644 (file)
@@ -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;
 }