From ab76e6ca5383c67fc192453998ba31eacbc21ba5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 19 Jan 2009 02:03:25 +0100 Subject: [PATCH] --- yaml --- r: 140067 b: refs/heads/master c: 98b8c7a0c42acf0d6963dbb9aabe4a2e312aae12 h: refs/heads/master i: 140065: 9e61885f8675091e09efa3e4f6374858068142d8 140063: 404a253fd90c1cff9d900656326662bfb0514e06 v: v3 --- [refs] | 2 +- trunk/fs/xfs/quota/xfs_dquot.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 602ffbb82534..d271c0d86896 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5bb87a33b2cfb8e7ef3383718274094bdff266a3 +refs/heads/master: 98b8c7a0c42acf0d6963dbb9aabe4a2e312aae12 diff --git a/trunk/fs/xfs/quota/xfs_dquot.c b/trunk/fs/xfs/quota/xfs_dquot.c index ebdf3c842dce..6543c0b29753 100644 --- a/trunk/fs/xfs/quota/xfs_dquot.c +++ b/trunk/fs/xfs/quota/xfs_dquot.c @@ -73,6 +73,8 @@ int xfs_dqreq_num; int xfs_dqerror_mod = 33; #endif +static struct lock_class_key xfs_dquot_other_class; + /* * Allocate and initialize a dquot. We don't always allocate fresh memory; * we try to reclaim a free dquot if the number of incore dquots are above @@ -139,7 +141,15 @@ xfs_qm_dqinit( ASSERT(dqp->q_trace); xfs_dqtrace_entry(dqp, "DQRECLAIMED_INIT"); #endif - } + } + + /* + * In either case we need to make sure group quotas have a different + * lock class than user quotas, to make sure lockdep knows we can + * locks of one of each at the same time. + */ + if (!(type & XFS_DQ_USER)) + lockdep_set_class(&dqp->q_qlock, &xfs_dquot_other_class); /* * log item gets initialized later