/* st_ref_mutex must be held entering this routine. Because it is called on last put, you should always use the scsi_tape_get() scsi_tape_put() helpers which manipulate the semaphore directly and never do a direct kref_put().  */
static void scsi_tape_release(struct kref *)
/* st_ref_mutex must be held entering this routine. Because it is called on last put, you should always use the scsi_tape_get() scsi_tape_put() helpers which manipulate the semaphore directly and never do a direct kref_put().  */
static void scsi_tape_release(struct kref *)
{
	struct scsi_tape *tpnt = to_scsi_tape(kref);
	struct gendisk *disk = tpnt->disk;
	tpnt->device = NULL;
	if (tpnt->buffer) {
		normalize_buffer(tpnt->buffer);
		kfree(tpnt->buffer->reserved_pages);
		kfree(tpnt->buffer);
	}
	disk->private_data = NULL;
	put_disk(disk);
	kfree(tpnt);
	return;
}