[PATCH] Unlock md devices when stopping them on reboot.

otherwise we get nasty messages about locks not being released.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Neil Brown 2006-05-26 10:39:25 +10:00 committed by Linus Torvalds
parent 309c68cc17
commit c71d48877e
1 changed files with 3 additions and 1 deletions

View File

@ -5028,8 +5028,10 @@ static int md_notify_reboot(struct notifier_block *this,
printk(KERN_INFO "md: stopping all md devices.\n");
ITERATE_MDDEV(mddev,tmp)
if (mddev_trylock(mddev))
if (mddev_trylock(mddev)) {
do_md_stop (mddev, 1);
mddev_unlock(mddev);
}
/*
* certain more exotic SCSI devices are known to be
* volatile wrt too early system reboots. While the