Skip to content
Commit 9c63f7f6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

sd: implement ->free_disk to simplify refcounting



Implement the ->free_disk method to to put struct scsi_disk when the last
gendisk reference count goes away.  This removes the need to clear
->private_data and thus freeze the queue on unbind.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220308055200.735835-8-hch@lst.de
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 534cf52a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment