diff mbox series

[v1,7/9] fs/fuse: drop idmap argument from __fuse_get_acl

Message ID 20240108120824.122178-8-aleksandr.mikhalitsyn@canonical.com (mailing list archive)
State New, archived
Headers show
Series fuse: basic support for idmapped mounts | expand

Commit Message

Aleksandr Mikhalitsyn Jan. 8, 2024, 12:08 p.m. UTC
We don't need to have idmap in the __fuse_get_acl as we don't
have any use for it.

In the current POSIX ACL implementation, idmapped mounts are
taken into account on the userspace/kernel border
(see vfs_set_acl_idmapped_mnt() and vfs_posix_acl_to_xattr()).

Cc: Christian Brauner <brauner@kernel.org>
Cc: Seth Forshee <sforshee@kernel.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Bernd Schubert <bschubert@ddn.com>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
---
 fs/fuse/acl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Christian Brauner Jan. 20, 2024, 3:24 p.m. UTC | #1
On Mon, Jan 08, 2024 at 01:08:22PM +0100, Alexander Mikhalitsyn wrote:
> We don't need to have idmap in the __fuse_get_acl as we don't
> have any use for it.
> 
> In the current POSIX ACL implementation, idmapped mounts are
> taken into account on the userspace/kernel border
> (see vfs_set_acl_idmapped_mnt() and vfs_posix_acl_to_xattr()).
> 
> Cc: Christian Brauner <brauner@kernel.org>
> Cc: Seth Forshee <sforshee@kernel.org>
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Bernd Schubert <bschubert@ddn.com>
> Cc: <linux-fsdevel@vger.kernel.org>
> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
> ---

Ah, that probably became obsolete when I did the VFS POSIX ACL api.
Thanks,
Reviewed-by: Christian Brauner <brauner@kernel.org>
Aleksandr Mikhalitsyn Jan. 29, 2024, 3:55 p.m. UTC | #2
On Sat, 20 Jan 2024 16:24:55 +0100
Christian Brauner <brauner@kernel.org> wrote:

> On Mon, Jan 08, 2024 at 01:08:22PM +0100, Alexander Mikhalitsyn wrote:
> > We don't need to have idmap in the __fuse_get_acl as we don't
> > have any use for it.
> > 
> > In the current POSIX ACL implementation, idmapped mounts are
> > taken into account on the userspace/kernel border
> > (see vfs_set_acl_idmapped_mnt() and vfs_posix_acl_to_xattr()).
> > 
> > Cc: Christian Brauner <brauner@kernel.org>
> > Cc: Seth Forshee <sforshee@kernel.org>
> > Cc: Miklos Szeredi <miklos@szeredi.hu>
> > Cc: Amir Goldstein <amir73il@gmail.com>
> > Cc: Bernd Schubert <bschubert@ddn.com>
> > Cc: <linux-fsdevel@vger.kernel.org>
> > Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
> > ---
> 
> Ah, that probably became obsolete when I did the VFS POSIX ACL api.

Precisely ;-)

> Thanks,
> Reviewed-by: Christian Brauner <brauner@kernel.org>
diff mbox series

Patch

diff --git a/fs/fuse/acl.c b/fs/fuse/acl.c
index 3d192b80a561..3a3cd88bd3d7 100644
--- a/fs/fuse/acl.c
+++ b/fs/fuse/acl.c
@@ -12,7 +12,6 @@ 
 #include <linux/posix_acl_xattr.h>
 
 static struct posix_acl *__fuse_get_acl(struct fuse_conn *fc,
-					struct mnt_idmap *idmap,
 					struct inode *inode, int type, bool rcu)
 {
 	int size;
@@ -74,7 +73,7 @@  struct posix_acl *fuse_get_acl(struct mnt_idmap *idmap,
 	if (fuse_no_acl(fc, inode))
 		return ERR_PTR(-EOPNOTSUPP);
 
-	return __fuse_get_acl(fc, idmap, inode, type, false);
+	return __fuse_get_acl(fc, inode, type, false);
 }
 
 struct posix_acl *fuse_get_inode_acl(struct inode *inode, int type, bool rcu)
@@ -90,8 +89,7 @@  struct posix_acl *fuse_get_inode_acl(struct inode *inode, int type, bool rcu)
 	 */
 	if (!fc->posix_acl)
 		return NULL;
-
-	return __fuse_get_acl(fc, &nop_mnt_idmap, inode, type, rcu);
+	return __fuse_get_acl(fc,  inode, type, rcu);
 }
 
 int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,