Skip to content

Commit 1b90344

Browse files
mihalicynidryomov
authored andcommitted
fs: export mnt_idmap_get/mnt_idmap_put
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>
1 parent 522dc51 commit 1b90344

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

fs/mnt_idmapping.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap)
256256

257257
return idmap;
258258
}
259+
EXPORT_SYMBOL_GPL(mnt_idmap_get);
259260

260261
/**
261262
* mnt_idmap_put - put a reference to an idmapping
@@ -271,3 +272,4 @@ void mnt_idmap_put(struct mnt_idmap *idmap)
271272
kfree(idmap);
272273
}
273274
}
275+
EXPORT_SYMBOL_GPL(mnt_idmap_put);

include/linux/mnt_idmapping.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ static inline bool vfsgid_eq_kgid(vfsgid_t vfsgid, kgid_t kgid)
115115

116116
int vfsgid_in_group_p(vfsgid_t vfsgid);
117117

118+
struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap);
119+
void mnt_idmap_put(struct mnt_idmap *idmap);
120+
118121
vfsuid_t make_vfsuid(struct mnt_idmap *idmap,
119122
struct user_namespace *fs_userns, kuid_t kuid);
120123

0 commit comments

Comments
 (0)