]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
fs: fix reporting supported extra file attributes for statx()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 18 Apr 2021 03:03:50 +0000 (23:03 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:32:20 +0000 (10:32 +0200)
commitcb3aeeb139b47b5346d7897ad679ec922d73f515
tree8a11b83ac18dbe7c7a17f84d775f9763b77befaf
parent0ba908cf7bb57dd1974e6e2d3541a0fed6d8bbc5
fs: fix reporting supported extra file attributes for statx()

BugLink: https://bugs.launchpad.net/bugs/1928857
commit 5afa7e8b70d65819245fece61a65fd753b4aae33 upstream.

statx(2) notes that any attribute that is not indicated as supported
by stx_attributes_mask has no usable value.  Commits 801e523796004
("fs: move generic stat response attr handling to vfs_getattr_nosec")
and 712b2698e4c02 ("fs/stat: Define DAX statx attribute") sets
STATX_ATTR_AUTOMOUNT and STATX_ATTR_DAX, respectively, without setting
stx_attributes_mask, which can cause xfstests generic/532 to fail.

Fix this in the same way as commit 1b9598c8fb99 ("xfs: fix reporting
supported extra file attributes for statx()")

Fixes: 801e523796004 ("fs: move generic stat response attr handling to vfs_getattr_nosec")
Fixes: 712b2698e4c02 ("fs/stat: Define DAX statx attribute")
Cc: stable@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/stat.c