aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c12
-rw-r--r--drivers/s390/block/dcssblk.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index d984e0fae630..ccf46c96adb4 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1149,12 +1149,14 @@ static void __dasd_device_process_final_queue(struct dasd_device *device,
1149{ 1149{
1150 struct list_head *l, *n; 1150 struct list_head *l, *n;
1151 struct dasd_ccw_req *cqr; 1151 struct dasd_ccw_req *cqr;
1152 struct dasd_block *block;
1152 1153
1153 list_for_each_safe(l, n, final_queue) { 1154 list_for_each_safe(l, n, final_queue) {
1154 cqr = list_entry(l, struct dasd_ccw_req, devlist); 1155 cqr = list_entry(l, struct dasd_ccw_req, devlist);
1155 list_del_init(&cqr->devlist); 1156 list_del_init(&cqr->devlist);
1156 if (cqr->block) 1157 block = cqr->block;
1157 spin_lock_bh(&cqr->block->queue_lock); 1158 if (block)
1159 spin_lock_bh(&block->queue_lock);
1158 switch (cqr->status) { 1160 switch (cqr->status) {
1159 case DASD_CQR_SUCCESS: 1161 case DASD_CQR_SUCCESS:
1160 cqr->status = DASD_CQR_DONE; 1162 cqr->status = DASD_CQR_DONE;
@@ -1172,15 +1174,13 @@ static void __dasd_device_process_final_queue(struct dasd_device *device,
1172 cqr, cqr->status); 1174 cqr, cqr->status);
1173 BUG(); 1175 BUG();
1174 } 1176 }
1175 if (cqr->block)
1176 spin_unlock_bh(&cqr->block->queue_lock);
1177 if (cqr->callback != NULL) 1177 if (cqr->callback != NULL)
1178 (cqr->callback)(cqr, cqr->callback_data); 1178 (cqr->callback)(cqr, cqr->callback_data);
1179 if (block)
1180 spin_unlock_bh(&block->queue_lock);
1179 } 1181 }
1180} 1182}
1181 1183
1182
1183
1184/* 1184/*
1185 * Take a look at the first request on the ccw queue and check 1185 * Take a look at the first request on the ccw queue and check
1186 * if it reached its expire time. If so, terminate the IO. 1186 * if it reached its expire time. If so, terminate the IO.
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 3faf0538b328..e6c94dbfdeaa 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -666,7 +666,7 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio)
666 page_addr = (unsigned long) 666 page_addr = (unsigned long)
667 page_address(bvec->bv_page) + bvec->bv_offset; 667 page_address(bvec->bv_page) + bvec->bv_offset;
668 source_addr = dev_info->start + (index<<12) + bytes_done; 668 source_addr = dev_info->start + (index<<12) + bytes_done;
669 if (unlikely(page_addr & 4095) != 0 || (bvec->bv_len & 4095) != 0) 669 if (unlikely((page_addr & 4095) != 0) || (bvec->bv_len & 4095) != 0)
670 // More paranoia. 670 // More paranoia.
671 goto fail; 671 goto fail;
672 if (bio_data_dir(bio) == READ) { 672 if (bio_data_dir(bio) == READ) {