mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6796bf54a6
commit
d63a5a74de
3 changed files with 12 additions and 1 deletions
|
|
@ -4423,7 +4423,7 @@ static int md_open(struct inode *inode, struct file *file)
|
|||
mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
|
||||
int err;
|
||||
|
||||
if ((err = mddev_lock(mddev)))
|
||||
if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1)))
|
||||
goto out;
|
||||
|
||||
err = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue