Skip to content

Commit

Permalink
[PATCH] regularize blk_cleanup_queue() use
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 18, 2006
1 parent 6f325a1 commit 1312f40
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/umem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = { {
Expand Down
4 changes: 2 additions & 2 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down
5 changes: 4 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/s390/block/dcssblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ dcssblk_shared_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);
Expand Down Expand Up @@ -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);
Expand All @@ -505,7 +505,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
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:
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1312f40

Please sign in to comment.