Commit 08b1599d authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Greg Kroah-Hartman

sd: Unregister integrity profile

commit e727c42b upstream.

The new integrity code did not correctly unregister the profile for SD
disks. Call blk_integrity_unregister() when we release a disk.
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Reported-by: default avatarSagi Grimberg <sagig@dev.mellanox.co.il>
Tested-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37efb2d9
...@@ -3100,6 +3100,7 @@ static void scsi_disk_release(struct device *dev) ...@@ -3100,6 +3100,7 @@ static void scsi_disk_release(struct device *dev)
ida_remove(&sd_index_ida, sdkp->index); ida_remove(&sd_index_ida, sdkp->index);
spin_unlock(&sd_index_lock); spin_unlock(&sd_index_lock);
blk_integrity_unregister(disk);
disk->private_data = NULL; disk->private_data = NULL;
put_disk(disk); put_disk(disk);
put_device(&sdkp->device->sdev_gendev); put_device(&sdkp->device->sdev_gendev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment