mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
cdrom: track if a cdrom_device_info was opened for data
Set a flag when a cdrom_device_info is opened for writing, instead of trying to figure out this at release time. This will allow to eventually remove the mode argument to the ->release block_device_operation as nothing but the CDROM drivers uses that argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20230608110258.189493-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
a4cec8bc14
commit
8cdf433e2b
@@ -63,6 +63,7 @@ struct cdrom_device_info {
|
||||
unsigned short mmc3_profile; /* current MMC3 profile */
|
||||
int (*exit)(struct cdrom_device_info *);
|
||||
int mrw_mode_page;
|
||||
bool opened_for_data;
|
||||
__s64 last_media_change_ms;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user