Linux 3.8 compat: Support CONFIG_UIDGID_STRICT_TYPE_CHECKS
authorRichard Yao <ryao@gentoo.org>
Sun, 14 Jul 2013 16:59:24 +0000 (12:59 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Aug 2013 22:31:52 +0000 (15:31 -0700)
commit570d6edf1d94917aab49c5755027d05b3c7bcd43
tree979e02ad02f201bec3d4ad1c23ffb828e463fdbc
parentfadd0c4da1e2ccd6014800d8b1a0fd117dd323e8
Linux 3.8 compat: Support CONFIG_UIDGID_STRICT_TYPE_CHECKS

When CONFIG_UIDGID_STRICT_TYPE_CHECKS is enabled uid_t/git_t are
replaced by kuid_t/kgid_t, which are structures instead of integral
types. This causes any code that uses an integral type to fail to build.
The User Namespace functionality introduced in Linux 3.8 requires
CONFIG_UIDGID_STRICT_TYPE_CHECKS, so we could not build against any
kernel that supported it.

We resolve this by converting between the new kuid_t/kgid_t structures
and the original uid_t/gid_t types.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1589
module/zfs/zfs_ctldir.c
module/zfs/zfs_znode.c
module/zfs/zpl_inode.c