aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/z2ram.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-22 22:05:19 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 01:37:36 -0400
commitf06d9a2b52e246a66b606130cea3f0d7b7be17a7 (patch)
tree020df1f9d54b00c72d8af02ac0827d496597e75a /drivers/block/z2ram.c
parent40cbbb781d3eba5d6ac0860db078af490e5c7c6b (diff)
block: replace end_request() with [__]blk_end_request_cur()
end_request() has been kept around for backward compatibility; however, it's about time for it to go away. * There aren't too many users left. * Its use of @updtodate is pretty confusing. * In some cases, newer code ends up using mixture of end_request() and [__]blk_end_request[_all](), which is way too confusing. So, add [__]blk_end_request_cur() and replace end_request() with it. Most conversions are straightforward. Noteworthy ones are... * paride/pcd: next_request() updated to take 0/-errno instead of 1/0. * paride/pf: pf_end_request() and next_request() updated to take 0/-errno instead of 1/0. * xd: xd_readwrite() updated to return 0/-errno instead of 1/0. * mtd/mtd_blkdevs: blktrans_discard_request() updated to return 0/-errno instead of 1/0. Unnecessary local variable res initialization removed from mtd_blktrans_thread(). [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Joerg Dorchain <joerg@dorchain.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Laurent Vivier <Laurent@lvivier.info> Cc: Tim Waugh <tim@cyberelk.net> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: unsik Kim <donari75@gmail.com>
Diffstat (limited to 'drivers/block/z2ram.c')
-rw-r--r--drivers/block/z2ram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 80754cdd3119..b66ad58a3c38 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -77,7 +77,7 @@ static void do_z2_request(struct request_queue *q)
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 req->sector, req->current_nr_sectors);
80 end_request(req, 0); 80 __blk_end_request_cur(req, -EIO);
81 continue; 81 continue;
82 } 82 }
83 while (len) { 83 while (len) {
@@ -93,7 +93,7 @@ static void do_z2_request(struct request_queue *q)
93 start += size; 93 start += size;
94 len -= size; 94 len -= size;
95 } 95 }
96 end_request(req, 1); 96 __blk_end_request_cur(req, 0);
97 } 97 }
98} 98}
99 99