ntfs3: rework xattr handlers and switch to POSIX ACL VFS helpers
authorChristian Brauner <brauner@kernel.org>
Mon, 29 Aug 2022 12:38:40 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:36 +0000 (12:34 +0200)
commit81fb3ee298d5346a8db8ff47fd08662bb01a04cd
tree8de216587ae5e72e2c0f4565acf845b999464633
parent33d478eee2b52408326653519672ee23642b2117
ntfs3: rework xattr handlers and switch to POSIX ACL VFS helpers

[ Upstream commit a26aa12384158116c0d80d50e0bdc7b3323551e2 ]

The xattr code in ntfs3 is currently a bit confused. For example, it
defines a POSIX ACL i_op->set_acl() method but instead of relying on the
generic POSIX ACL VFS helpers it defines its own set of xattr helpers
with the consequence that i_op->set_acl() is currently dead code.

Switch ntfs3 to rely on the VFS POSIX ACL xattr handlers. Also remove
i_op->{g,s}et_acl() methods from symlink inode operations. Symlinks
don't support xattrs.

This is a preliminary change for the following patches which move
handling idmapped mounts directly in posix_acl_xattr_set().

This survives POSIX ACL xfstests.

Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Reviewed-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/inode.c
fs/ntfs3/xattr.c