Skip to content

Commit

Permalink
blk_end_request: changing ub (take 4)
Browse files Browse the repository at this point in the history
This patch converts ub to use blk_end_request interfaces.
Related 'uptodate' arguments are converted to 'error'.

Cc: Pete Zaitcev <zaitcev@redhat.com>
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>
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent b828623 commit 7d699ba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,16 +808,16 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)

static void ub_end_rq(struct request *rq, unsigned int scsi_status)
{
int uptodate;
int error;

if (scsi_status == 0) {
uptodate = 1;
error = 0;
} else {
uptodate = 0;
error = -EIO;
rq->errors = scsi_status;
}
end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
end_that_request_last(rq, uptodate);
if (__blk_end_request(rq, error, blk_rq_bytes(rq)))
BUG();
}

static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
Expand Down

0 comments on commit 7d699ba

Please sign in to comment.