Commit 0521f34f authored by Tsuyoshi Uchida's avatar Tsuyoshi Uchida Committed by Daniel Verkamp
Browse files

scsi: do not unregister bdev during lun delete (#116)

The bdev was not created by the SCSI layer, so spdk_bdev_unregister
shouldn't be called here.
parent eeb08505
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -383,11 +383,6 @@ spdk_scsi_lun_delete(const char *lun_name)
		spdk_scsi_dev_delete_lun(dev, lun);
	}

	/* LUNs are always created in a pair with a blockdev.
	 * Delete the blockdev associated with this lun.
	 */
	spdk_bdev_unregister(lun->bdev);

	/* Destroy this lun */
	spdk_scsi_lun_destruct(lun);
	pthread_mutex_unlock(&g_spdk_scsi.mutex);