summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-03-08 06:51:54 +0100
committerJens Axboe <axboe@kernel.dk>2022-03-09 03:40:01 +0100
commit01d0c698536fe920733fc6cab7f9740c7acfdece (patch)
tree9c6f9f16cf3460a8bc9b91314c8cf62c8e4d8ef4 /drivers/scsi/sr.h
parentsd: implement ->free_disk to simplify refcounting (diff)
downloadlinux-01d0c698536fe920733fc6cab7f9740c7acfdece.tar.xz
linux-01d0c698536fe920733fc6cab7f9740c7acfdece.zip
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 <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20220308055200.735835-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/sr.h')
-rw-r--r--drivers/scsi/sr.h4
1 files changed, 0 insertions, 4 deletions
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 <linux/kref.h>
#include <linux/mutex.h>
#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;