diff options
Diffstat (limited to 'drivers/s390/char/tape_block.c')
-rw-r--r-- | drivers/s390/char/tape_block.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 55d2d0f4eabc..83cea9a55e2f 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -48,14 +48,14 @@ | |||
48 | static DEFINE_MUTEX(tape_block_mutex); | 48 | static DEFINE_MUTEX(tape_block_mutex); |
49 | static int tapeblock_open(struct block_device *, fmode_t); | 49 | static int tapeblock_open(struct block_device *, fmode_t); |
50 | static int tapeblock_release(struct gendisk *, fmode_t); | 50 | static int tapeblock_release(struct gendisk *, fmode_t); |
51 | static int tapeblock_medium_changed(struct gendisk *); | 51 | static unsigned int tapeblock_check_events(struct gendisk *, unsigned int); |
52 | static int tapeblock_revalidate_disk(struct gendisk *); | 52 | static int tapeblock_revalidate_disk(struct gendisk *); |
53 | 53 | ||
54 | static const struct block_device_operations tapeblock_fops = { | 54 | static const struct block_device_operations tapeblock_fops = { |
55 | .owner = THIS_MODULE, | 55 | .owner = THIS_MODULE, |
56 | .open = tapeblock_open, | 56 | .open = tapeblock_open, |
57 | .release = tapeblock_release, | 57 | .release = tapeblock_release, |
58 | .media_changed = tapeblock_medium_changed, | 58 | .check_events = tapeblock_check_events, |
59 | .revalidate_disk = tapeblock_revalidate_disk, | 59 | .revalidate_disk = tapeblock_revalidate_disk, |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -161,7 +161,6 @@ tapeblock_requeue(struct work_struct *work) { | |||
161 | 161 | ||
162 | spin_lock_irq(&device->blk_data.request_queue_lock); | 162 | spin_lock_irq(&device->blk_data.request_queue_lock); |
163 | while ( | 163 | while ( |
164 | !blk_queue_plugged(queue) && | ||
165 | blk_peek_request(queue) && | 164 | blk_peek_request(queue) && |
166 | nr_queued < TAPEBLOCK_MIN_REQUEUE | 165 | nr_queued < TAPEBLOCK_MIN_REQUEUE |
167 | ) { | 166 | ) { |
@@ -237,6 +236,7 @@ tapeblock_setup_device(struct tape_device * device) | |||
237 | disk->major = tapeblock_major; | 236 | disk->major = tapeblock_major; |
238 | disk->first_minor = device->first_minor; | 237 | disk->first_minor = device->first_minor; |
239 | disk->fops = &tapeblock_fops; | 238 | disk->fops = &tapeblock_fops; |
239 | disk->events = DISK_EVENT_MEDIA_CHANGE; | ||
240 | disk->private_data = tape_get_device(device); | 240 | disk->private_data = tape_get_device(device); |
241 | disk->queue = blkdat->request_queue; | 241 | disk->queue = blkdat->request_queue; |
242 | set_capacity(disk, 0); | 242 | set_capacity(disk, 0); |
@@ -340,8 +340,8 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
340 | return 0; | 340 | return 0; |
341 | } | 341 | } |
342 | 342 | ||
343 | static int | 343 | static unsigned int |
344 | tapeblock_medium_changed(struct gendisk *disk) | 344 | tapeblock_check_events(struct gendisk *disk, unsigned int clearing) |
345 | { | 345 | { |
346 | struct tape_device *device; | 346 | struct tape_device *device; |
347 | 347 | ||
@@ -349,7 +349,7 @@ tapeblock_medium_changed(struct gendisk *disk) | |||
349 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", | 349 | DBF_LH(6, "tapeblock_medium_changed(%p) = %d\n", |
350 | device, device->blk_data.medium_changed); | 350 | device, device->blk_data.medium_changed); |
351 | 351 | ||
352 | return device->blk_data.medium_changed; | 352 | return device->blk_data.medium_changed ? DISK_EVENT_MEDIA_CHANGE : 0; |
353 | } | 353 | } |
354 | 354 | ||
355 | /* | 355 | /* |