Commit ee7633f0 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Sasha Levin

sd: Unregister integrity profile

[ Upstream commit e727c42b ]

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>
Cc: stable@vger.kernel.org # v3.17+
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 34c26c01
...@@ -3118,6 +3118,7 @@ static void scsi_disk_release(struct device *dev) ...@@ -3118,6 +3118,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