Lines Matching refs:idmap

35 bool check_fsmapping(const struct mnt_idmap *idmap,  in check_fsmapping()  argument
38 return idmap->owner != sb->s_user_ns; in check_fsmapping()
96 vfsuid_t make_vfsuid(struct mnt_idmap *idmap, in make_vfsuid() argument
101 struct user_namespace *mnt_userns = idmap->owner; in make_vfsuid()
135 vfsgid_t make_vfsgid(struct mnt_idmap *idmap, in make_vfsgid() argument
139 struct user_namespace *mnt_userns = idmap->owner; in make_vfsgid()
164 kuid_t from_vfsuid(struct mnt_idmap *idmap, in from_vfsuid() argument
168 struct user_namespace *mnt_userns = idmap->owner; in from_vfsuid()
192 kgid_t from_vfsgid(struct mnt_idmap *idmap, in from_vfsgid() argument
196 struct user_namespace *mnt_userns = idmap->owner; in from_vfsgid()
233 struct mnt_idmap *idmap; in alloc_mnt_idmap() local
235 idmap = kzalloc(sizeof(struct mnt_idmap), GFP_KERNEL_ACCOUNT); in alloc_mnt_idmap()
236 if (!idmap) in alloc_mnt_idmap()
239 idmap->owner = get_user_ns(mnt_userns); in alloc_mnt_idmap()
240 refcount_set(&idmap->count, 1); in alloc_mnt_idmap()
241 return idmap; in alloc_mnt_idmap()
252 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap) in mnt_idmap_get() argument
254 if (idmap != &nop_mnt_idmap) in mnt_idmap_get()
255 refcount_inc(&idmap->count); in mnt_idmap_get()
257 return idmap; in mnt_idmap_get()
267 void mnt_idmap_put(struct mnt_idmap *idmap) in mnt_idmap_put() argument
269 if (idmap != &nop_mnt_idmap && refcount_dec_and_test(&idmap->count)) { in mnt_idmap_put()
270 put_user_ns(idmap->owner); in mnt_idmap_put()
271 kfree(idmap); in mnt_idmap_put()