diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-22 22:05:19 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-28 01:37:36 -0400 |
commit | f06d9a2b52e246a66b606130cea3f0d7b7be17a7 (patch) | |
tree | 020df1f9d54b00c72d8af02ac0827d496597e75a /drivers/block/amiflop.c | |
parent | 40cbbb781d3eba5d6ac0860db078af490e5c7c6b (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/amiflop.c')
-rw-r--r-- | drivers/block/amiflop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 8df436ff7068..b99a2a606d02 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -1359,7 +1359,7 @@ static void redo_fd_request(void) | |||
1359 | #endif | 1359 | #endif |
1360 | block = CURRENT->sector + cnt; | 1360 | block = CURRENT->sector + cnt; |
1361 | if ((int)block > floppy->blocks) { | 1361 | if ((int)block > floppy->blocks) { |
1362 | end_request(CURRENT, 0); | 1362 | __blk_end_request_cur(CURRENT, -EIO); |
1363 | goto repeat; | 1363 | goto repeat; |
1364 | } | 1364 | } |
1365 | 1365 | ||
@@ -1373,11 +1373,11 @@ static void redo_fd_request(void) | |||
1373 | 1373 | ||
1374 | if ((rq_data_dir(CURRENT) != READ) && (rq_data_dir(CURRENT) != WRITE)) { | 1374 | if ((rq_data_dir(CURRENT) != READ) && (rq_data_dir(CURRENT) != WRITE)) { |
1375 | printk(KERN_WARNING "do_fd_request: unknown command\n"); | 1375 | printk(KERN_WARNING "do_fd_request: unknown command\n"); |
1376 | end_request(CURRENT, 0); | 1376 | __blk_end_request_cur(CURRENT, -EIO); |
1377 | goto repeat; | 1377 | goto repeat; |
1378 | } | 1378 | } |
1379 | if (get_track(drive, track) == -1) { | 1379 | if (get_track(drive, track) == -1) { |
1380 | end_request(CURRENT, 0); | 1380 | __blk_end_request_cur(CURRENT, -EIO); |
1381 | goto repeat; | 1381 | goto repeat; |
1382 | } | 1382 | } |
1383 | 1383 | ||
@@ -1391,7 +1391,7 @@ static void redo_fd_request(void) | |||
1391 | 1391 | ||
1392 | /* keep the drive spinning while writes are scheduled */ | 1392 | /* keep the drive spinning while writes are scheduled */ |
1393 | if (!fd_motor_on(drive)) { | 1393 | if (!fd_motor_on(drive)) { |
1394 | end_request(CURRENT, 0); | 1394 | __blk_end_request_cur(CURRENT, -EIO); |
1395 | goto repeat; | 1395 | goto repeat; |
1396 | } | 1396 | } |
1397 | /* | 1397 | /* |
@@ -1410,7 +1410,7 @@ static void redo_fd_request(void) | |||
1410 | CURRENT->nr_sectors -= CURRENT->current_nr_sectors; | 1410 | CURRENT->nr_sectors -= CURRENT->current_nr_sectors; |
1411 | CURRENT->sector += CURRENT->current_nr_sectors; | 1411 | CURRENT->sector += CURRENT->current_nr_sectors; |
1412 | 1412 | ||
1413 | end_request(CURRENT, 1); | 1413 | __blk_end_request_cur(CURRENT, 0); |
1414 | goto repeat; | 1414 | goto repeat; |
1415 | } | 1415 | } |
1416 | 1416 | ||