From 01d0c698536fe920733fc6cab7f9740c7acfdece Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 8 Mar 2022 06:51:54 +0100 Subject: sr: implement ->free_disk to simplify refcounting Simplify the refcounting and remove the need to clear disk->private_data by implementing the ->free_disk method. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20220308055200.735835-9-hch@lst.de Signed-off-by: Jens Axboe --- drivers/scsi/sr.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/scsi/sr.h') diff --git a/drivers/scsi/sr.h b/drivers/scsi/sr.h index d80af3fcb6f9..1175f2e213b5 100644 --- a/drivers/scsi/sr.h +++ b/drivers/scsi/sr.h @@ -18,7 +18,6 @@ #ifndef _SR_H #define _SR_H -#include #include #define MAX_RETRIES 3 @@ -51,9 +50,6 @@ typedef struct scsi_cd { struct cdrom_device_info cdi; struct mutex lock; - /* We hold gendisk and scsi_device references on probe and use - * the refs on this kref to decide when to release them */ - struct kref kref; struct gendisk *disk; } Scsi_CD; -- cgit v1.2.3