Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

blk_end_request: changing viocd (take 4)

This patch converts viocd to use blk_end_request interfaces.
Related 'uptodate' arguments are converted to 'error'.

As a result, the interface of internal function, viocd_end_request(),
is changed.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by

Kiyoshi Ueda and committed by
Jens Axboe
e935eb9d f530f036

+6 -9
+6 -9
drivers/cdrom/viocd.c
··· 289 289 return 0; 290 290 } 291 291 292 - static void viocd_end_request(struct request *req, int uptodate) 292 + static void viocd_end_request(struct request *req, int error) 293 293 { 294 294 int nsectors = req->hard_nr_sectors; 295 295 ··· 302 302 if (!nsectors) 303 303 nsectors = 1; 304 304 305 - if (end_that_request_first(req, uptodate, nsectors)) 305 + if (__blk_end_request(req, error, nsectors << 9)) 306 306 BUG(); 307 - add_disk_randomness(req->rq_disk); 308 - blkdev_dequeue_request(req); 309 - end_that_request_last(req, uptodate); 310 307 } 311 308 312 309 static int rwreq; ··· 314 317 315 318 while ((rwreq == 0) && ((req = elv_next_request(q)) != NULL)) { 316 319 if (!blk_fs_request(req)) 317 - viocd_end_request(req, 0); 320 + viocd_end_request(req, -EIO); 318 321 else if (send_request(req) < 0) { 319 322 printk(VIOCD_KERN_WARNING 320 323 "unable to send message to OS/400!"); 321 - viocd_end_request(req, 0); 324 + viocd_end_request(req, -EIO); 322 325 } else 323 326 rwreq++; 324 327 } ··· 529 532 "with rc %d:0x%04X: %s\n", 530 533 req, event->xRc, 531 534 bevent->sub_result, err->msg); 532 - viocd_end_request(req, 0); 535 + viocd_end_request(req, -EIO); 533 536 } else 534 - viocd_end_request(req, 1); 537 + viocd_end_request(req, 0); 535 538 536 539 /* restart handling of incoming requests */ 537 540 spin_unlock_irqrestore(&viocd_reqlock, flags);