diff options
Diffstat (limited to 'drivers/s390/block/dasd_diag.c')
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index b9a7f7733446..2efaddfae560 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -505,8 +505,9 @@ static struct dasd_ccw_req *dasd_diag_build_cp(struct dasd_device *memdev, | |||
505 | return ERR_PTR(-EINVAL); | 505 | return ERR_PTR(-EINVAL); |
506 | blksize = block->bp_block; | 506 | blksize = block->bp_block; |
507 | /* Calculate record id of first and last block. */ | 507 | /* Calculate record id of first and last block. */ |
508 | first_rec = req->sector >> block->s2b_shift; | 508 | first_rec = blk_rq_pos(req) >> block->s2b_shift; |
509 | last_rec = (req->sector + req->nr_sectors - 1) >> block->s2b_shift; | 509 | last_rec = |
510 | (blk_rq_pos(req) + blk_rq_sectors(req) - 1) >> block->s2b_shift; | ||
510 | /* Check struct bio and count the number of blocks for the request. */ | 511 | /* Check struct bio and count the number of blocks for the request. */ |
511 | count = 0; | 512 | count = 0; |
512 | rq_for_each_segment(bv, req, iter) { | 513 | rq_for_each_segment(bv, req, iter) { |