aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/z2ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/z2ram.c')
-rw-r--r--drivers/block/z2ram.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index b66ad58a3c38..d4e6b71f514a 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -71,12 +71,12 @@ static void do_z2_request(struct request_queue *q)
71{ 71{
72 struct request *req; 72 struct request *req;
73 while ((req = elv_next_request(q)) != NULL) { 73 while ((req = elv_next_request(q)) != NULL) {
74 unsigned long start = req->sector << 9; 74 unsigned long start = blk_rq_pos(req) << 9;
75 unsigned long len = req->current_nr_sectors << 9; 75 unsigned long len = blk_rq_cur_sectors(req) << 9;
76 76
77 if (start + len > z2ram_size) { 77 if (start + len > z2ram_size) {
78 printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", 78 printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
79 req->sector, req->current_nr_sectors); 79 blk_rq_pos(req), blk_rq_cur_sectors(req));
80 __blk_end_request_cur(req, -EIO); 80 __blk_end_request_cur(req, -EIO);
81 continue; 81 continue;
82 } 82 }