From: NeilBrown Date: Fri, 31 Mar 2006 10:32:02 +0000 (-0800) Subject: [PATCH] md: Remove some code that can sleep from under a spinlock X-Git-Tag: v2.6.17-rc1~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=926ce2d8a7d446c720faec9d8c5105eeb04bcf7a;p=linux-2.6 [PATCH] md: Remove some code that can sleep from under a spinlock And remove the comments that were put in inplace of a fix too.... Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 039e071c10..1ed5152db4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -215,13 +215,11 @@ static void mddev_put(mddev_t *mddev) return; if (!mddev->raid_disks && list_empty(&mddev->disks)) { list_del(&mddev->all_mddevs); - /* that blocks */ + spin_unlock(&all_mddevs_lock); blk_cleanup_queue(mddev->queue); - /* that also blocks */ kobject_unregister(&mddev->kobj); - /* result blows... */ - } - spin_unlock(&all_mddevs_lock); + } else + spin_unlock(&all_mddevs_lock); } static mddev_t * mddev_find(dev_t unit)