Skip to content

Commit

Permalink
[PATCH] Unlock md devices when stopping them on reboot.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Neil Brown authored and Linus Torvalds committed May 26, 2006
1 parent 309c68c commit c71d488
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c71d488

Please sign in to comment.