]> err.no Git - linux-2.6/commitdiff
[PATCH] regularize blk_cleanup_queue() use
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Mar 2006 16:02:03 +0000 (11:02 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Mar 2006 23:34:20 +0000 (18:34 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/block/loop.c
drivers/block/pktcdvd.c
drivers/block/umem.c
drivers/md/dm.c
drivers/md/md.c
drivers/s390/block/dcssblk.c

index 5f6d1a5cce11fc3bebdf1f0ab29c875db7850e09..0010704739e381b21db668d9a81d6b0392c888b5 100644 (file)
@@ -1307,7 +1307,7 @@ static int __init loop_init(void)
 
 out_mem4:
        while (i--)
-               blk_put_queue(loop_dev[i].lo_queue);
+               blk_cleanup_queue(loop_dev[i].lo_queue);
        devfs_remove("loop");
        i = max_loop;
 out_mem3:
@@ -1328,7 +1328,7 @@ static void loop_exit(void)
 
        for (i = 0; i < max_loop; i++) {
                del_gendisk(disks[i]);
-               blk_put_queue(loop_dev[i].lo_queue);
+               blk_cleanup_queue(loop_dev[i].lo_queue);
                put_disk(disks[i]);
        }
        devfs_remove("loop");
index bc9b2bcd7dba71023824ebb8adc6cbf9e9e0c712..476a5b553f34d9ae9d57171b78d7445203cfaf24 100644 (file)
@@ -2514,7 +2514,7 @@ static int pkt_setup_dev(struct pkt_ctrl_command *ctrl_cmd)
        return 0;
 
 out_new_dev:
-       blk_put_queue(disk->queue);
+       blk_cleanup_queue(disk->queue);
 out_mem2:
        put_disk(disk);
 out_mem:
@@ -2555,7 +2555,7 @@ static int pkt_remove_dev(struct pkt_ctrl_command *ctrl_cmd)
        DPRINTK("pktcdvd: writer %s unmapped\n", pd->name);
 
        del_gendisk(pd->disk);
-       blk_put_queue(pd->disk->queue);
+       blk_cleanup_queue(pd->disk->queue);
        put_disk(pd->disk);
 
        pkt_devs[idx] = NULL;
index 4ada1268b40d1abda498b2eddf9ed6caa830a665..c16e66b9c7a74f56d1fef2b55ba8f7bdf2de66e8 100644 (file)
@@ -1131,7 +1131,7 @@ static void mm_pci_remove(struct pci_dev *dev)
                pci_free_consistent(card->dev, PAGE_SIZE*2,
                                    card->mm_pages[1].desc,
                                    card->mm_pages[1].page_dma);
-       blk_put_queue(card->queue);
+       blk_cleanup_queue(card->queue);
 }
 
 static const struct pci_device_id mm_pci_ids[] = { {
index 745ca1f67b14a93db8e7c2802746d7963641aa7e..88d60202b9db409bcfcc48069ef7bc49547172af 100644 (file)
@@ -840,7 +840,7 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
  bad3:
        mempool_destroy(md->io_pool);
  bad2:
-       blk_put_queue(md->queue);
+       blk_cleanup_queue(md->queue);
        free_minor(minor);
  bad1:
        kfree(md);
@@ -860,7 +860,7 @@ static void free_dev(struct mapped_device *md)
        del_gendisk(md->disk);
        free_minor(minor);
        put_disk(md->disk);
-       blk_put_queue(md->queue);
+       blk_cleanup_queue(md->queue);
        kfree(md);
 }
 
index d05e3125d298bd5c7083204d6f24d098e002c66e..5ed2228745cb306743761a44809d20d47a1652aa 100644 (file)
@@ -213,8 +213,11 @@ static void mddev_put(mddev_t *mddev)
                return;
        if (!mddev->raid_disks && list_empty(&mddev->disks)) {
                list_del(&mddev->all_mddevs);
-               blk_put_queue(mddev->queue);
+               /* that blocks */
+               blk_cleanup_queue(mddev->queue);
+               /* that also blocks */
                kobject_unregister(&mddev->kobj);
+               /* result blows... */
        }
        spin_unlock(&all_mddevs_lock);
 }
index 2e727f49ad19c90f7e7440ab012bc3e9f8b4c6aa..44133250da2eeddb5252d244224607d333c4a5a0 100644 (file)
@@ -273,7 +273,7 @@ removeseg:
        list_del(&dev_info->lh);
 
        del_gendisk(dev_info->gd);
-       blk_put_queue(dev_info->dcssblk_queue);
+       blk_cleanup_queue(dev_info->dcssblk_queue);
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
        device_unregister(dev);
@@ -491,7 +491,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
 unregister_dev:
        PRINT_ERR("device_create_file() failed!\n");
        list_del(&dev_info->lh);
-       blk_put_queue(dev_info->dcssblk_queue);
+       blk_cleanup_queue(dev_info->dcssblk_queue);
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
        device_unregister(&dev_info->dev);
@@ -505,7 +505,7 @@ list_del:
 unload_seg:
        segment_unload(local_buf);
 dealloc_gendisk:
-       blk_put_queue(dev_info->dcssblk_queue);
+       blk_cleanup_queue(dev_info->dcssblk_queue);
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
 free_dev_info:
@@ -562,7 +562,7 @@ dcssblk_remove_store(struct device *dev, struct device_attribute *attr, const ch
        list_del(&dev_info->lh);
 
        del_gendisk(dev_info->gd);
-       blk_put_queue(dev_info->dcssblk_queue);
+       blk_cleanup_queue(dev_info->dcssblk_queue);
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
        device_unregister(&dev_info->dev);