public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: cmm@us.ibm.com, tytso@mit.edu, sandeen@redhat.com,
	linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH -V3 9/9] ext4: Fix lockdep recursive locking warning
Date: Fri, 7 Nov 2008 21:52:11 +0530	[thread overview]
Message-ID: <20081107162211.GN25194@skywalker> (raw)
In-Reply-To: <4913F698.30309@cn.fujitsu.com>

On Fri, Nov 07, 2008 at 04:04:40PM +0800, Li Zefan wrote:
> I got compile error on IA64:
> 
> fs/ext4/mballoc.c: In function ‘ext4_mb_add_groupinfo’:
> fs/ext4/mballoc.c:2482: error: implicit declaration of function ‘__init_rwsem’
> 
> 

Can you try this patch. I guess IA64 doesn't support lockdep

ext4: Fix lockdep recursive locking warning

From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Indicate that the group locks can be taken in loop.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 fs/ext4/mballoc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index f58de20..cb0ccbe 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2413,6 +2413,9 @@ ext4_mb_store_history(struct ext4_allocation_context *ac)
 #define ext4_mb_history_init(sb)
 #endif
 
+#ifdef CONFIG_LOCKDEP
+static struct lock_class_key alloc_sem_key[NR_BG_LOCKS];
+#endif
 
 /* Create and initialize ext4_group_info data for the given group. */
 int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
@@ -2473,8 +2476,14 @@ int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
 	}
 
 	INIT_LIST_HEAD(&meta_group_info[i]->bb_prealloc_list);
-	init_rwsem(&meta_group_info[i]->alloc_sem);
+#ifdef CONFIG_LOCKDEP
+	__init_rwsem(&meta_group_info[i]->alloc_sem,
+			"&meta_group_info[i]->alloc_sem",
+			&alloc_sem_key[i]);
 	meta_group_info[i]->bb_free_root.rb_node = NULL;;
+#else
+	init_rwsem(&meta_group_info[i]->alloc_sem);
+#endif
 
 #ifdef DOUBLE_CHECK
 	{
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-11-07 16:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 18:49 [RFC PATCH -V3 1/9] ext4: sparse fixes Aneesh Kumar K.V
2008-11-06 18:49 ` [RFC PATCH -V3 2/9] ext4: Add blocks added during resize to bitmap Aneesh Kumar K.V
2008-11-06 18:49   ` [RFC PATCH -V3 3/9] ext4: Use EXT4_GROUP_INFO_NEED_INIT_BIT during resize Aneesh Kumar K.V
2008-11-06 18:49     ` [RFC PATCH -V3 4/9] ext4: cleanup mballoc header files Aneesh Kumar K.V
2008-11-06 18:49       ` [RFC PATCH -V3 5/9] ext4: Add sparse annotations for the group info semaphore Aneesh Kumar K.V
2008-11-06 18:49         ` [RFC PATCH -V3 6/9] jbd2: Call journal commit callback without holding j_list_lock Aneesh Kumar K.V
2008-11-06 18:49           ` [RFC PATCH -V3 7/9] ext4: don't use blocks freed but not yet committed in buddy cache init Aneesh Kumar K.V
2008-11-06 18:49             ` [RFC PATCH -V3 8/9] ext4: Fix double free of blocks Aneesh Kumar K.V
2008-11-06 18:49               ` [RFC PATCH -V3 9/9] ext4: Fix lockdep recursive locking warning Aneesh Kumar K.V
2008-11-07  8:04                 ` Li Zefan
2008-11-07 16:22                   ` Aneesh Kumar K.V [this message]
2008-11-08  1:21                     ` Li Zefan
2008-11-06 22:37               ` [RFC PATCH -V3 8/9] ext4: Fix double free of blocks Theodore Tso
2008-11-07 16:01                 ` Aneesh Kumar K.V
2008-11-06 22:09 ` [RFC PATCH -V3 1/9] ext4: sparse fixes Theodore Tso
2008-11-07 14:20   ` Aneesh Kumar K.V
2008-11-07 14:45     ` Theodore Tso
2008-11-07 15:07     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081107162211.GN25194@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox