Skip to content

Commit

Permalink
md, dm, scsi, nvme, libnvdimm: drop blk_integrity_unregister() at shu…
Browse files Browse the repository at this point in the history
…tdown

Now that the integrity profile is statically allocated there is no work
to do when shutting down an integrity enabled block device.

Cc: Matthew Wilcox <[email protected]>
Cc: Mike Snitzer <[email protected]>
Cc: James Bottomley <[email protected]>
Acked-by: NeilBrown <[email protected]>
Acked-by: Keith Busch <[email protected]>
Acked-by: Vishal Verma <[email protected]>
Tested-by: Ross Zwisler <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
djbw authored and axboe committed Oct 21, 2015
1 parent 25520d5 commit 9609b99
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2233,8 +2233,6 @@ static void cleanup_mapped_device(struct mapped_device *md)
spin_lock(&_minor_lock);
md->disk->private_data = NULL;
spin_unlock(&_minor_lock);
if (blk_get_integrity(md->disk))
blk_integrity_unregister(md->disk);
del_gendisk(md->disk);
put_disk(md->disk);
}
Expand Down
1 change: 0 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -5539,7 +5539,6 @@ static int do_md_stop(struct mddev *mddev, int mode,
if (mddev->hold_active == UNTIL_STOP)
mddev->hold_active = 0;
}
blk_integrity_unregister(disk);
md_new_event(mddev);
sysfs_notify_dirent_safe(mddev->sysfs_state);
return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/nvdimm/btt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,6 @@ static int btt_blk_init(struct btt *btt)

static void btt_blk_cleanup(struct btt *btt)
{
blk_integrity_unregister(btt->btt_disk);
del_gendisk(btt->btt_disk);
put_disk(btt->btt_disk);
blk_cleanup_queue(btt->btt_queue);
Expand Down
5 changes: 1 addition & 4 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2407,11 +2407,8 @@ static void nvme_ns_remove(struct nvme_ns *ns)

if (kill)
blk_set_queue_dying(ns->queue);
if (ns->disk->flags & GENHD_FL_UP) {
if (blk_get_integrity(ns->disk))
blk_integrity_unregister(ns->disk);
if (ns->disk->flags & GENHD_FL_UP)
del_gendisk(ns->disk);
}
if (kill || !blk_queue_dying(ns->queue)) {
blk_mq_abort_requeue_list(ns->queue);
blk_cleanup_queue(ns->queue);
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3068,7 +3068,6 @@ static void scsi_disk_release(struct device *dev)
ida_remove(&sd_index_ida, sdkp->index);
spin_unlock(&sd_index_lock);

blk_integrity_unregister(disk);
disk->private_data = NULL;
put_disk(disk);
put_device(&sdkp->device->sdev_gendev);
Expand Down

0 comments on commit 9609b99

Please sign in to comment.