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/ps3disk.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/ps3disk.c')
-rw-r--r-- | drivers/block/ps3disk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index bccc42bb9212..d23b54bc2f50 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
@@ -158,7 +158,7 @@ static int ps3disk_submit_request_sg(struct ps3_storage_device *dev, | |||
158 | if (res) { | 158 | if (res) { |
159 | dev_err(&dev->sbd.core, "%s:%u: %s failed %d\n", __func__, | 159 | dev_err(&dev->sbd.core, "%s:%u: %s failed %d\n", __func__, |
160 | __LINE__, op, res); | 160 | __LINE__, op, res); |
161 | end_request(req, 0); | 161 | __blk_end_request_cur(req, -EIO); |
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
@@ -180,7 +180,7 @@ static int ps3disk_submit_flush_request(struct ps3_storage_device *dev, | |||
180 | if (res) { | 180 | if (res) { |
181 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%llx\n", | 181 | dev_err(&dev->sbd.core, "%s:%u: sync cache failed 0x%llx\n", |
182 | __func__, __LINE__, res); | 182 | __func__, __LINE__, res); |
183 | end_request(req, 0); | 183 | __blk_end_request_cur(req, -EIO); |
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
@@ -205,7 +205,7 @@ static void ps3disk_do_request(struct ps3_storage_device *dev, | |||
205 | break; | 205 | break; |
206 | } else { | 206 | } else { |
207 | blk_dump_rq_flags(req, DEVICE_NAME " bad request"); | 207 | blk_dump_rq_flags(req, DEVICE_NAME " bad request"); |
208 | end_request(req, 0); | 208 | __blk_end_request_cur(req, -EIO); |
209 | continue; | 209 | continue; |
210 | } | 210 | } |
211 | } | 211 | } |