Commit e138b4e0 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

swim: clean up request completion paths

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: default avatarTejun Heo <tj@kernel.org>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 467ca759
...@@ -535,10 +535,6 @@ static void redo_fd_request(struct request_queue *q) ...@@ -535,10 +535,6 @@ static void redo_fd_request(struct request_queue *q)
__blk_end_request_cur(req, -EIO); __blk_end_request_cur(req, -EIO);
continue; continue;
} }
if (req->current_nr_sectors == 0) {
__blk_end_request_cur(req, 0);
continue;
}
if (!fs->disk_in) { if (!fs->disk_in) {
__blk_end_request_cur(req, -EIO); __blk_end_request_cur(req, -EIO);
continue; continue;
...@@ -561,9 +557,6 @@ static void redo_fd_request(struct request_queue *q) ...@@ -561,9 +557,6 @@ static void redo_fd_request(struct request_queue *q)
__blk_end_request_cur(req, -EIO); __blk_end_request_cur(req, -EIO);
continue; 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); __blk_end_request_cur(req, 0);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment