OSDN Git Service

ksmbd: use vfs_remove_acl()
authorChristian Brauner <brauner@kernel.org>
Thu, 22 Sep 2022 15:17:16 +0000 (17:17 +0200)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Thu, 20 Oct 2022 08:13:30 +0000 (10:13 +0200)
commitb82784a2f52a7a2a5491d36f0c257cf64d87abb5
tree3636c6a6b8718a432812db071b79ce274e64f619
parentaeb7f00542af48ac63e448de46d672cfd79a7069
ksmbd: use vfs_remove_acl()

The current way of setting and getting posix acls through the generic
xattr interface is error prone and type unsafe. The vfs needs to
interpret and fixup posix acls before storing or reporting it to
userspace. Various hacks exist to make this work. The code is hard to
understand and difficult to maintain in it's current form. Instead of
making this work by hacking posix acls through xattr handlers we are
building a dedicated posix acl api around the get and set inode
operations. This removes a lot of hackiness and makes the codepaths
easier to maintain. A lot of background can be found in [1].

Now that we've switched all filesystems that can serve as the lower
filesystem for ksmbd we can switch ksmbd over to rely on
the posix acl api. Note that this is orthogonal to switching the vfs
itself over.

Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/ksmbd/vfs.c