fs: export mnt_idmap_get/mnt_idmap_put
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Mon, 7 Aug 2023 13:26:15 +0000 (15:26 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 3 Nov 2023 22:28:33 +0000 (23:28 +0100)
These helpers are required to support idmapped mounts in CephFS.

Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/mnt_idmapping.c
include/linux/mnt_idmapping.h

index 4905665c47d0dcc1244790d4a9e89be48091d455..57d1dedf3f8fa72fe7cb32316ee72961559a82c6 100644 (file)
@@ -256,6 +256,7 @@ struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap)
 
        return idmap;
 }
+EXPORT_SYMBOL_GPL(mnt_idmap_get);
 
 /**
  * mnt_idmap_put - put a reference to an idmapping
@@ -271,3 +272,4 @@ void mnt_idmap_put(struct mnt_idmap *idmap)
                kfree(idmap);
        }
 }
+EXPORT_SYMBOL_GPL(mnt_idmap_put);
index 057c89867aa2f35947265f499556c81dc8fc7d73..b8da2db4ecd295672ec512800ffc3b50b363c63d 100644 (file)
@@ -115,6 +115,9 @@ static inline bool vfsgid_eq_kgid(vfsgid_t vfsgid, kgid_t kgid)
 
 int vfsgid_in_group_p(vfsgid_t vfsgid);
 
+struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap);
+void mnt_idmap_put(struct mnt_idmap *idmap);
+
 vfsuid_t make_vfsuid(struct mnt_idmap *idmap,
                     struct user_namespace *fs_userns, kuid_t kuid);