diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-16 06:56:19 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-18 04:01:41 -0400 |
commit | 4c376dcae892e5b5daf8576c864061d076d4e4dc (patch) | |
tree | dbb4dbc9422992a00f7b478e4254b4da922f7158 /include/linux/quota.h | |
parent | aca645a6a54e001e004f1f1e0eafd94f994bb1b3 (diff) |
userns: Convert struct dquot dq_id to be a struct kqid
Change struct dquot dq_id to a struct kqid and remove the now
unecessary dq_type.
Make minimal changes to dquot, quota_tree, quota_v1, quota_v2, ext3,
ext4, and ocfs2 to deal with the change in quota structures and
signatures. The ocfs2 changes are larger than most because of the
extensive tracing throughout the ocfs2 quota code that prints out
dq_id.
quota_tree.c:get_index is modified to take a struct kqid instead of a
qid_t because all of it's callers pass in dquot->dq_id and it allows
me to introduce only a single conversion.
The rest of the changes are either just replacing dq_type with dq_id.type,
adding conversions to deal with the change in type and occassionally
adding qid_eq to allow quota id comparisons in a user namespace safe way.
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Theodore Tso <tytso@mit.edu>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r-- | include/linux/quota.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h index 8b2760427252..dcd5721e626d 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -419,10 +419,9 @@ struct dquot { | |||
419 | atomic_t dq_count; /* Use count */ | 419 | atomic_t dq_count; /* Use count */ |
420 | wait_queue_head_t dq_wait_unused; /* Wait queue for dquot to become unused */ | 420 | wait_queue_head_t dq_wait_unused; /* Wait queue for dquot to become unused */ |
421 | struct super_block *dq_sb; /* superblock this applies to */ | 421 | struct super_block *dq_sb; /* superblock this applies to */ |
422 | unsigned int dq_id; /* ID this applies to (uid, gid) */ | 422 | struct kqid dq_id; /* ID this applies to (uid, gid, projid) */ |
423 | loff_t dq_off; /* Offset of dquot on disk */ | 423 | loff_t dq_off; /* Offset of dquot on disk */ |
424 | unsigned long dq_flags; /* See DQ_* */ | 424 | unsigned long dq_flags; /* See DQ_* */ |
425 | short dq_type; /* Type of quota */ | ||
426 | struct mem_dqblk dq_dqb; /* Diskquota usage */ | 425 | struct mem_dqblk dq_dqb; /* Diskquota usage */ |
427 | }; | 426 | }; |
428 | 427 | ||