diff options
author | Christoph Hellwig <hch@lst.de> | 2009-01-18 20:03:11 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-01-18 20:03:11 -0500 |
commit | a4edd1da20af79b2e92efeee3ca94831c8024d61 (patch) | |
tree | 920e0730dd3e84fb24bc64aab24ca049b5389cdb /fs/xfs/quota/xfs_qm.c | |
parent | 178eae342b34185ef7b11e62df2f74ba45daa56e (diff) |
xfs: add a separate lock class for the per-mount list of dquots
We can have both a a quota hash chain and the per-mount list locked at
the same time. But given that both use the same struct dqhash as list
head we have to tell lockdep that they are different lock classes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/quota/xfs_qm.c')
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 6b13960cf318..7a2beb64314f 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -1070,6 +1070,13 @@ xfs_qm_sync( | |||
1070 | return 0; | 1070 | return 0; |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | /* | ||
1074 | * The hash chains and the mplist use the same xfs_dqhash structure as | ||
1075 | * their list head, but we can take the mplist qh_lock and one of the | ||
1076 | * hash qh_locks at the same time without any problem as they aren't | ||
1077 | * related. | ||
1078 | */ | ||
1079 | static struct lock_class_key xfs_quota_mplist_class; | ||
1073 | 1080 | ||
1074 | /* | 1081 | /* |
1075 | * This initializes all the quota information that's kept in the | 1082 | * This initializes all the quota information that's kept in the |
@@ -1105,6 +1112,8 @@ xfs_qm_init_quotainfo( | |||
1105 | } | 1112 | } |
1106 | 1113 | ||
1107 | xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0); | 1114 | xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0); |
1115 | lockdep_set_class(&qinf->qi_dqlist.qh_lock, &xfs_quota_mplist_class); | ||
1116 | |||
1108 | qinf->qi_dqreclaims = 0; | 1117 | qinf->qi_dqreclaims = 0; |
1109 | 1118 | ||
1110 | /* mutex used to serialize quotaoffs */ | 1119 | /* mutex used to serialize quotaoffs */ |