diff options
author | Frank Munzert <munzert@de.ibm.com> | 2008-10-28 11:10:17 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-28 11:12:04 +0100 |
commit | 7a4a1ccd44c85c7d92b20a361e3854431c6935e0 (patch) | |
tree | 11a8cf84fe4ec22733529336cc633ede26db2774 | |
parent | [S390] Fix sysdev class file creation. (diff) | |
download | linux-7a4a1ccd44c85c7d92b20a361e3854431c6935e0.tar.xz linux-7a4a1ccd44c85c7d92b20a361e3854431c6935e0.zip |
[S390] tape block: complete request with correct locking
__blk_end_request must be called with request queue lock held. We need to use
blk_end_request rather than __blk_end_request.
Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/char/tape_block.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 023803dbb0c7..ae18baf59f06 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c @@ -76,7 +76,7 @@ tapeblock_trigger_requeue(struct tape_device *device) static void tapeblock_end_request(struct request *req, int error) { - if (__blk_end_request(req, error, blk_rq_bytes(req))) + if (blk_end_request(req, error, blk_rq_bytes(req))) BUG(); } @@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *work) { nr_queued++; spin_unlock(get_ccwdev_lock(device->cdev)); - spin_lock(&device->blk_data.request_queue_lock); + spin_lock_irq(&device->blk_data.request_queue_lock); while ( !blk_queue_plugged(queue) && elv_next_request(queue) && @@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *work) { if (rq_data_dir(req) == WRITE) { DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); blkdev_dequeue_request(req); + spin_unlock_irq(&device->blk_data.request_queue_lock); tapeblock_end_request(req, -EIO); + spin_lock_irq(&device->blk_data.request_queue_lock); continue; } blkdev_dequeue_request(req); |