]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] lockdep: avoid lockdep warning in md
authorNeilBrown <neilb@suse.de>
Fri, 8 Dec 2006 10:36:17 +0000 (02:36 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 8 Dec 2006 16:28:39 +0000 (08:28 -0800)
commit118d9b150360a9727a96f9aa7a0f4336a02737c1
tree8b12bc626b8f1507b7b550865c5f8282bcac6c27
parent60bf0500492f05f41ebe22a0ce299b8642b6ed48
[PATCH] lockdep: avoid lockdep warning in md

md_open takes ->reconfig_mutex which causes lockdep to complain.  This
(normally) doesn't have deadlock potential as the possible conflict is with a
reconfig_mutex in a different device.

I say "normally" because if a loop were created in the array->member hierarchy
a deadlock could happen.  However that causes bigger problems than a deadlock
and should be fixed independently.

So we flag the lock in md_open as a nested lock.  This requires defining
mutex_lock_interruptible_nested.

Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c
include/linux/mutex.h
kernel/mutex.c