Commit:     3b0e044d5a881c937293a045158149514b86783c
Parent:     0eccf60bfa9190d1588b2bf07d23d7b9b3a19d9e
Author:     Kiyoshi Ueda <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 11 00:32:11 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Feb 11 00:32:11 2008 +0100

    ide: another possible ide panic fix for blk-end-request
    I have reviewed all blk-end-request patches again to confirm whether
    there are any similar problems with the last week's ide-cd panic:
    And I found a possible similar bug in ide-io change:
    ide_end_drive_cmd() could be called for blk_pc_request() which could
    have bios.  To complete such requests correctly, we need to pass
    the actual size of the request.
    Otherwise, __blk_end_request() returns 1 because the request still has
    bios, and the system will BUG() unnecessarily.
    The following patch fixes the bug and should be applied on top of
    Linus' git.
    Signed-off-by: Kiyoshi Ueda <[EMAIL PROTECTED]>
    Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]>
    Cc: Borislav Petkov <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
 drivers/ide/ide-io.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 3addbe4..e41383f 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -388,7 +388,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
        spin_lock_irqsave(&ide_lock, flags);
        HWGROUP(drive)->rq = NULL;
        rq->errors = err;
-       if (__blk_end_request(rq, (rq->errors ? -EIO : 0), 0))
+       if (unlikely(__blk_end_request(rq, (rq->errors ? -EIO : 0),
+                                      blk_rq_bytes(rq))))
        spin_unlock_irqrestore(&ide_lock, flags);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to