aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-04-13 01:06:51 -0400
committerAlex Elder <aelder@sgi.com>2010-05-19 10:58:11 -0400
commite6a81f13aa9aa20ef03174210aed24791865b05e (patch)
tree727202721a225004e2522f32278de294c3748e70 /fs/xfs/quota/xfs_dquot.h
parent368e136174344c417bad6ff0380b7b3f574bf120 (diff)
xfs: convert the dquot hash list to use list heads
Convert the dquot hash list on the filesystem to use listhead infrastructure rather than the roll-your-own in the quota code. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.h')
-rw-r--r--fs/xfs/quota/xfs_dquot.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_dquot.h b/fs/xfs/quota/xfs_dquot.h
index 6992a67c165a..169b3c24af79 100644
--- a/fs/xfs/quota/xfs_dquot.h
+++ b/fs/xfs/quota/xfs_dquot.h
@@ -33,17 +33,12 @@
33 * The hash chain headers (hash buckets) 33 * The hash chain headers (hash buckets)
34 */ 34 */
35typedef struct xfs_dqhash { 35typedef struct xfs_dqhash {
36 struct xfs_dquot *qh_next; 36 struct list_head qh_list;
37 struct mutex qh_lock; 37 struct mutex qh_lock;
38 uint qh_version; /* ever increasing version */ 38 uint qh_version; /* ever increasing version */
39 uint qh_nelems; /* number of dquots on the list */ 39 uint qh_nelems; /* number of dquots on the list */
40} xfs_dqhash_t; 40} xfs_dqhash_t;
41 41
42typedef struct xfs_dqlink {
43 struct xfs_dquot *ql_next; /* forward link */
44 struct xfs_dquot **ql_prevp; /* pointer to prev ql_next */
45} xfs_dqlink_t;
46
47struct xfs_mount; 42struct xfs_mount;
48struct xfs_trans; 43struct xfs_trans;
49 44
@@ -57,7 +52,6 @@ struct xfs_trans;
57typedef struct xfs_dqmarker { 52typedef struct xfs_dqmarker {
58 struct xfs_dquot*dqm_flnext; /* link to freelist: must be first */ 53 struct xfs_dquot*dqm_flnext; /* link to freelist: must be first */
59 struct xfs_dquot*dqm_flprev; 54 struct xfs_dquot*dqm_flprev;
60 xfs_dqlink_t dqm_hashlist; /* link to the hash chain */
61 uint dqm_flags; /* various flags (XFS_DQ_*) */ 55 uint dqm_flags; /* various flags (XFS_DQ_*) */
62} xfs_dqmarker_t; 56} xfs_dqmarker_t;
63 57
@@ -67,6 +61,7 @@ typedef struct xfs_dqmarker {
67typedef struct xfs_dquot { 61typedef struct xfs_dquot {
68 xfs_dqmarker_t q_lists; /* list ptrs, q_flags (marker) */ 62 xfs_dqmarker_t q_lists; /* list ptrs, q_flags (marker) */
69 struct list_head q_mplist; /* mount's list of dquots */ 63 struct list_head q_mplist; /* mount's list of dquots */
64 struct list_head q_hashlist; /* mount's list of dquots */
70 xfs_dqhash_t *q_hash; /* the hashchain header */ 65 xfs_dqhash_t *q_hash; /* the hashchain header */
71 struct xfs_mount*q_mount; /* filesystem this relates to */ 66 struct xfs_mount*q_mount; /* filesystem this relates to */
72 struct xfs_trans*q_transp; /* trans this belongs to currently */ 67 struct xfs_trans*q_transp; /* trans this belongs to currently */