Use the fact that for the first loop rq->current_nr_sectors is always
set and unify moving to the next buffer for read/write requests.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
while (sectors_to_transfer > 0) {
int this_transfer;
- /*
- * If we've filled the present buffer but there's another
- * chained buffer after it, move on.
- */
- if (!write && rq->current_nr_sectors == 0 && rq->nr_sectors)
- cdrom_end_request(drive, 1);
-
if (!rq->current_nr_sectors) {
if (!write)
/*
/*
* current buffer complete, move on
*/
- if (write && rq->current_nr_sectors == 0 && rq->nr_sectors)
+ if (rq->current_nr_sectors == 0 && rq->nr_sectors)
cdrom_end_request(drive, 1);
}