aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-12-08 05:36:17 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:39 -0500
commitd63a5a74dee87883fda6b7d170244acaac5b05e8 (patch)
tree8b12bc626b8f1507b7b550865c5f8282bcac6c27 /drivers/md/md.c
parent6796bf54a64df36f96a42ae222423fffe36c58a5 (diff)
[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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d2bcb410e3ab..3ce7a5d81d81 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4423,7 +4423,7 @@ static int md_open(struct inode *inode, struct file *file)
4423 mddev_t *mddev = inode->i_bdev->bd_disk->private_data; 4423 mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
4424 int err; 4424 int err;
4425 4425
4426 if ((err = mddev_lock(mddev))) 4426 if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1)))
4427 goto out; 4427 goto out;
4428 4428
4429 err = 0; 4429 err = 0;