/* sr_ref_mutex must be held entering this routine. Because it is called on last put, you should always use the scsi_cd_get() scsi_cd_put() helpers which manipulate the semaphore directly and never do a direct kref_put().  */
static void sr_kref_release(struct kref *kref)
/* sr_ref_mutex must be held entering this routine. Because it is called on last put, you should always use the scsi_cd_get() scsi_cd_put() helpers which manipulate the semaphore directly and never do a direct kref_put().  */
static void sr_kref_release(struct kref *kref)
{
	struct scsi_cd *cd = container_of(kref, struct scsi_cd, kref);
	struct gendisk *disk = cd->disk;
	spin_lock(&sr_index_lock);
	clear_bit(MINOR(disk_devt(disk)), sr_index_bits);
	spin_unlock(&sr_index_lock);
	unregister_cdrom(&cd->cdi);
	disk->private_data = NULL;
	put_disk(disk);
	kfree(cd);
}