diff options
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index ebdf3c842dce..6543c0b29753 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -73,6 +73,8 @@ int xfs_dqreq_num; | |||
73 | int xfs_dqerror_mod = 33; | 73 | int xfs_dqerror_mod = 33; |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | static struct lock_class_key xfs_dquot_other_class; | ||
77 | |||
76 | /* | 78 | /* |
77 | * Allocate and initialize a dquot. We don't always allocate fresh memory; | 79 | * Allocate and initialize a dquot. We don't always allocate fresh memory; |
78 | * we try to reclaim a free dquot if the number of incore dquots are above | 80 | * we try to reclaim a free dquot if the number of incore dquots are above |
@@ -139,7 +141,15 @@ xfs_qm_dqinit( | |||
139 | ASSERT(dqp->q_trace); | 141 | ASSERT(dqp->q_trace); |
140 | xfs_dqtrace_entry(dqp, "DQRECLAIMED_INIT"); | 142 | xfs_dqtrace_entry(dqp, "DQRECLAIMED_INIT"); |
141 | #endif | 143 | #endif |
142 | } | 144 | } |
145 | |||
146 | /* | ||
147 | * In either case we need to make sure group quotas have a different | ||
148 | * lock class than user quotas, to make sure lockdep knows we can | ||
149 | * locks of one of each at the same time. | ||
150 | */ | ||
151 | if (!(type & XFS_DQ_USER)) | ||
152 | lockdep_set_class(&dqp->q_qlock, &xfs_dquot_other_class); | ||
143 | 153 | ||
144 | /* | 154 | /* |
145 | * log item gets initialized later | 155 | * log item gets initialized later |