userns: Implement struct kqid
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 16 Sep 2012 08:11:45 +0000 (01:11 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 18 Sep 2012 08:01:38 +0000 (01:01 -0700)
commite8a3e4719b7ec19288c56f22623f537cb78885c1
treeee5ae227f2aa9db13358e66511f5b42d0ed783cb
parentf76d207a66c3a53defea67e7d36c3eb1b7d6d61d
userns: Implement struct kqid

Add the data type struct kqid which holds the kernel internal form of
the owning identifier of a quota.  struct kqid is a replacement for
the implicit union of uid, gid and project id stored in an unsigned
int and the quota type field that is was used in the quota data
structures.  Making the data type explicit allows the kuid_t and
kgid_t type safety to propogate more thoroughly through the code,
revealing more places where uid/gid conversions need be made.

Along with the data type struct kqid comes the helper functions
qid_eq, qid_lt, from_kqid, from_kqid_munged, qid_valid, make_kqid,
make_kqid_invalid, make_kqid_uid, make_kqid_gid.

Cc: Jan Kara <jack@suse.cz>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/quota/Makefile
fs/quota/kqid.c [new file with mode: 0644]
include/linux/quota.h