ide-cd: unify moving to the next buffer in cdrom_rw_intr()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Friday, February 1, 2008 - 7:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37782f...
Commit:     37782fcefcca437f870e581e6cc316111f8b7660
Parent:     21ea1f0f011a5bbfbc3f5c134a4e537e5f5c1c50
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Fri Feb 1 23:09:27 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Fri Feb 1 23:09:27 2008 +0100

    ide-cd: unify moving to the next buffer in cdrom_rw_intr()
    
    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>
---
 drivers/ide/ide-cd.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 4b395e0..0f17117 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1302,13 +1302,6 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive)
 	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)
 				/*
@@ -1342,7 +1335,7 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive)
 		/*
 		 * 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);
 	}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide-cd: unify moving to the next buffer in cdrom_rw_intr(), Linux Kernel Mailing List..., (Fri Feb 1, 7:59 pm)