]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/md.c
[PATCH] Unlock md devices when stopping them on reboot.
[linux-2.6-omap-h63xx.git] / drivers / md / md.c
index 3ca3cfb03a7e28078e125509ed858587f403d00f..ec802913f9776ffe2744e21c052e9b26ba337a0b 100644 (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