Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77618
b: refs/heads/master
c: e935eb9
h: refs/heads/master
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent 034613b commit bd48408
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f530f036378421fb0b59bb829a8097a50bca79e2
refs/heads/master: e935eb9dba66ce2533d06e459cf5bbfc17c9318b
15 changes: 6 additions & 9 deletions trunk/drivers/cdrom/viocd.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int send_request(struct request *req)
return 0;
}

static void viocd_end_request(struct request *req, int uptodate)
static void viocd_end_request(struct request *req, int error)
{
int nsectors = req->hard_nr_sectors;

Expand All @@ -302,11 +302,8 @@ static void viocd_end_request(struct request *req, int uptodate)
if (!nsectors)
nsectors = 1;

if (end_that_request_first(req, uptodate, nsectors))
if (__blk_end_request(req, error, nsectors << 9))
BUG();
add_disk_randomness(req->rq_disk);
blkdev_dequeue_request(req);
end_that_request_last(req, uptodate);
}

static int rwreq;
Expand All @@ -317,11 +314,11 @@ static void do_viocd_request(struct request_queue *q)

while ((rwreq == 0) && ((req = elv_next_request(q)) != NULL)) {
if (!blk_fs_request(req))
viocd_end_request(req, 0);
viocd_end_request(req, -EIO);
else if (send_request(req) < 0) {
printk(VIOCD_KERN_WARNING
"unable to send message to OS/400!");
viocd_end_request(req, 0);
viocd_end_request(req, -EIO);
} else
rwreq++;
}
Expand Down Expand Up @@ -532,9 +529,9 @@ static void vio_handle_cd_event(struct HvLpEvent *event)
"with rc %d:0x%04X: %s\n",
req, event->xRc,
bevent->sub_result, err->msg);
viocd_end_request(req, 0);
viocd_end_request(req, -EIO);
} else
viocd_end_request(req, 1);
viocd_end_request(req, 0);

/* restart handling of incoming requests */
spin_unlock_irqrestore(&viocd_reqlock, flags);
Expand Down

0 comments on commit bd48408

Please sign in to comment.