userns: Store uid and gid types in vfs structures with kuid_t and kgid_t types
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 8 Feb 2012 15:07:50 +0000 (07:07 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 3 May 2012 10:29:32 +0000 (03:29 -0700)
commit92361636e0153bd0cb22e7dfe3fc6287f6537c66
tree8b7d8f91aa528c2bad8ff97c737b2612e414480a
parent5af662030e5db1a5560fd917250d5d688a6be586
userns: Store uid and gid types in vfs structures with kuid_t and kgid_t types

The conversion of all of the users is not done yet there are too many to change
in one go and leave the code reviewable. For now I change just the header and
a few trivial users and rely on CONFIG_UIDGID_STRICT_TYPE_CHECKS not being set
to ensure that the code will still compile during the transition.

Helper functions i_uid_read, i_uid_write, i_gid_read, i_gid_write are added
so that in most cases filesystems can avoid the complexities of multiple user
namespaces and can concentrate on moving their raw numeric values into and
out of the vfs data structures.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/inode.c
include/linux/fs.h