acl: don't depend on IOP_XATTR
authorChristian Brauner <brauner@kernel.org>
Wed, 1 Feb 2023 13:15:01 +0000 (14:15 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Mon, 6 Mar 2023 08:59:20 +0000 (09:59 +0100)
commite499214ce3ef50c50522719e753a1ffc928c2ec1
tree63f403e964ca4b9e80eacad844177b416306d9a0
parenta1fbb607340d49f208e90cc0d7bdfff2141cce8d
acl: don't depend on IOP_XATTR

All codepaths that don't want to implement POSIX ACLs should simply not
implement the associated inode operations instead of relying on
IOP_XATTR. That's the case for all filesystems today.

For vfs_listxattr() all filesystems that explicitly turn of xattrs for a
given inode all set inode->i_op to a dedicated set of inode operations
that doesn't implement ->listxattr().  We can remove the dependency of
vfs_listxattr() on IOP_XATTR.

Removing this dependency will allow us to decouple POSIX ACLs from
IOP_XATTR and they can still be listed even if no other xattr handlers
are implemented. Otherwise we would have to implement elaborate schemes
to raise IOP_XATTR even if sb->s_xattr is set to NULL.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/posix_acl.c
fs/xattr.c