Skip to content

Commit

Permalink
swim: clean up request completion paths
Browse files Browse the repository at this point in the history
swim curiously tries to update request parameters before calling
__blk_end_request() when __blk_end_request() will do it anyway and
unnecessarily checks whether current_nr_sectors is zero right after
fetching.

Drop unnecessary stuff and use standard block layer mechanisms.

[ Impact: cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Apr 28, 2009
1 parent 467ca75 commit e138b4e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/block/swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,6 @@ static void redo_fd_request(struct request_queue *q)
__blk_end_request_cur(req, -EIO);
continue;
}
if (req->current_nr_sectors == 0) {
__blk_end_request_cur(req, 0);
continue;
}
if (!fs->disk_in) {
__blk_end_request_cur(req, -EIO);
continue;
Expand All @@ -561,9 +557,6 @@ static void redo_fd_request(struct request_queue *q)
__blk_end_request_cur(req, -EIO);
continue;
}
req->nr_sectors -= req->current_nr_sectors;
req->sector += req->current_nr_sectors;
req->buffer += req->current_nr_sectors * 512;
__blk_end_request_cur(req, 0);
break;
}
Expand Down

0 comments on commit e138b4e

Please sign in to comment.