Commit:     cbc31a475a7f7748bd0a4e536533868e7cff8645
Parent:     5044eed48886b105a123333fe7ca97c6bd496120
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 25 13:01:21 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 13:50:55 2007 -0700

    packet: fix error handling
    The packet driver is assuming (reasonably) that the (undocumented)
    request.errors is an errno.  But it is in fact some mysterious bitfield.  
    things go wrong we return weird positive numbers to the VFS as pointers and 
    goes oops.
    Thanks to William Heimbigner for reporting and diagnosis.
    (It doesn't oops, but this driver still doesn't work for William)
    Cc: William Heimbigner <[EMAIL PROTECTED]>
    Cc: Peter Osterlund <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/block/pktcdvd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a4fb703..f1b9dd7 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -777,7 +777,8 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, 
struct packet_command *
                rq->cmd_flags |= REQ_QUIET;
        blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0);
-       ret = rq->errors;
+       if (rq->errors)
+               ret = -EIO;
        return ret;
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