diff options
author | Christoph Hellwig <hch@lst.de> | 2009-01-19 02:03:11 +0100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2009-01-19 14:44:44 +1100 |
commit | 080dda7f5e8e8df95bcd17a5345c276e365a2054 (patch) | |
tree | 19937537e0c3d623255ccf1e76af36eceb2fb584 /fs/xfs/quota | |
parent | 62e194ecdaf8a1935991c1f8704886328d96a391 (diff) | |
download | kernel_samsung_espresso10-080dda7f5e8e8df95bcd17a5345c276e365a2054.zip kernel_samsung_espresso10-080dda7f5e8e8df95bcd17a5345c276e365a2054.tar.gz kernel_samsung_espresso10-080dda7f5e8e8df95bcd17a5345c276e365a2054.tar.bz2 |
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')
-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 6b13960..7a2beb6 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -1070,6 +1070,13 @@ xfs_qm_sync( return 0; } +/* + * The hash chains and the mplist use the same xfs_dqhash structure as + * their list head, but we can take the mplist qh_lock and one of the + * hash qh_locks at the same time without any problem as they aren't + * related. + */ +static struct lock_class_key xfs_quota_mplist_class; /* * This initializes all the quota information that's kept in the @@ -1105,6 +1112,8 @@ xfs_qm_init_quotainfo( } xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0); + lockdep_set_class(&qinf->qi_dqlist.qh_lock, &xfs_quota_mplist_class); + qinf->qi_dqreclaims = 0; /* mutex used to serialize quotaoffs */ |