diff mbox series

[v6,06/15] ceph: allow idmapped permission inode op

Message ID 20230609093125.252186-7-aleksandr.mikhalitsyn@canonical.com
State Superseded
Headers show
Series [v6,01/15] fs: export mnt_idmap_get/mnt_idmap_put | expand

Commit Message

Aleksandr Mikhalitsyn June 9, 2023, 9:31 a.m. UTC
From: Christian Brauner <christian.brauner@ubuntu.com>

Enable ceph_permission() to handle idmapped mounts. This is just a
matter of passing down the mount's idmapping.

Cc: Xiubo Li <xiubli@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
---
 fs/ceph/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 533349fe542f..f45d9c066523 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2922,7 +2922,7 @@  int ceph_permission(struct mnt_idmap *idmap, struct inode *inode,
 	err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED, false);
 
 	if (!err)
-		err = generic_permission(&nop_mnt_idmap, inode, mask);
+		err = generic_permission(idmap, inode, mask);
 	return err;
 }