summaryrefslogtreecommitdiff
path: root/include/linux/cdrom.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-08 14:02:33 +0300
committerJens Axboe <axboe@kernel.dk>2023-06-12 17:04:03 +0300
commit8cdf433e2b8e4fc6c7b4393deb93fb258175d537 (patch)
tree68c3626349538049e4efb67cad2caa83045d0cec /include/linux/cdrom.h
parenta4cec8bc14c02e15006a71f02b0e1bbc72b9f796 (diff)
downloadlinux-8cdf433e2b8e4fc6c7b4393deb93fb258175d537.tar.xz
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>
Diffstat (limited to 'include/linux/cdrom.h')
-rw-r--r--include/linux/cdrom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 0a5db0b0c958..adcc9f2beb26 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -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;
};