diff options
author | Frank Munzert <munzert@de.ibm.com> | 2008-10-28 06:10:17 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-28 06:12:04 -0400 |
commit | 7a4a1ccd44c85c7d92b20a361e3854431c6935e0 (patch) | |
tree | 11a8cf84fe4ec22733529336cc633ede26db2774 | |
parent | da5aae7036692fa8d03da1b705c76fd750ed9e38 (diff) |
[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) | |||
76 | static void | 76 | static void |
77 | tapeblock_end_request(struct request *req, int error) | 77 | tapeblock_end_request(struct request *req, int error) |
78 | { | 78 | { |
79 | if (__blk_end_request(req, error, blk_rq_bytes(req))) | 79 | if (blk_end_request(req, error, blk_rq_bytes(req))) |
80 | BUG(); | 80 | BUG(); |
81 | } | 81 | } |
82 | 82 | ||
@@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *work) { | |||
166 | nr_queued++; | 166 | nr_queued++; |
167 | spin_unlock(get_ccwdev_lock(device->cdev)); | 167 | spin_unlock(get_ccwdev_lock(device->cdev)); |
168 | 168 | ||
169 | spin_lock(&device->blk_data.request_queue_lock); | 169 | spin_lock_irq(&device->blk_data.request_queue_lock); |
170 | while ( | 170 | while ( |
171 | !blk_queue_plugged(queue) && | 171 | !blk_queue_plugged(queue) && |
172 | elv_next_request(queue) && | 172 | elv_next_request(queue) && |
@@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *work) { | |||
176 | if (rq_data_dir(req) == WRITE) { | 176 | if (rq_data_dir(req) == WRITE) { |
177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); | 177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); |
178 | blkdev_dequeue_request(req); | 178 | blkdev_dequeue_request(req); |
179 | spin_unlock_irq(&device->blk_data.request_queue_lock); | ||
179 | tapeblock_end_request(req, -EIO); | 180 | tapeblock_end_request(req, -EIO); |
181 | spin_lock_irq(&device->blk_data.request_queue_lock); | ||
180 | continue; | 182 | continue; |
181 | } | 183 | } |
182 | blkdev_dequeue_request(req); | 184 | blkdev_dequeue_request(req); |