summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-22 14:06:13 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 14:35:21 +0100
commit1545e0b419ba1d9b9bee4061d4826340afe6b0aa (patch)
tree907512c58c36776d03d554dd878e26abd965d124 /drivers/scsi/sr.c
parentblock: move GENHD_FL_NATIVE_CAPACITY to disk->state (diff)
downloadlinux-1545e0b419ba1d9b9bee4061d4826340afe6b0aa.tar.xz
linux-1545e0b419ba1d9b9bee4061d4826340afe6b0aa.zip
block: move GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE to disk->event_flags
GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE is all about the event reporting mechanism, so move it to the event_flags field. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211122130625.1136848-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 8e4af111c078..be445dc35f2c 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -684,9 +684,10 @@ static int sr_probe(struct device *dev)
disk->minors = 1;
sprintf(disk->disk_name, "sr%d", minor);
disk->fops = &sr_bdops;
- disk->flags = GENHD_FL_CD | GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE;
+ disk->flags = GENHD_FL_CD;
disk->events = DISK_EVENT_MEDIA_CHANGE | DISK_EVENT_EJECT_REQUEST;
- disk->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT;
+ disk->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT |
+ DISK_EVENT_FLAG_BLOCK_ON_EXCL_WRITE;
blk_queue_rq_timeout(sdev->request_queue, SR_TIMEOUT);