]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sd: Unregister integrity profile
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Apr 2015 20:56:23 +0000 (16:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:01:59 +0000 (22:01 +0200)
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@oracle.com>
Reported-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Tested-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sd.c

index 05ea0d49a3a3ddf2f039670db88c4d9f126662f4..ad35ccdb92a22bd98fdae99b84f3086706fc86f6 100644 (file)
@@ -3100,6 +3100,7 @@ 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);