[PATCH 3.19 138/177] sd: Unregister integrity profile

From: Greg Kroah-Hartman
Date: Sat May 02 2015 - 16:24:56 EST


3.19-stable review patch. If anyone has any objections, please let me know.

------------------

From: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>

commit e727c42bd55794765c460b7ac2b6cc969f2a9698 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: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Reported-by: Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx>
Tested-by: Sagi Grimberg <sagig@xxxxxxxxxxxx>
Signed-off-by: James Bottomley <JBottomley@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/scsi/sd.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3100,6 +3100,7 @@ static void scsi_disk_release(struct 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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/