lkml.org 
[lkml]   [2010]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2] SCSI: fix bio.bi_rw handling
    Date
    Return of the bi_rw tests is no longer bool after commit 74450be1. So
    testing against constants doesn't make sense anymore. Fix this bug in
    osd_req_read by removing "== 1" in test.

    This is not a problem now, where REQ_WRITE is 1, but this can change
    in the future and we don't want to rely on that.

    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
    Cc: Christoph Hellwig <hch@lst.de>
    ---
    drivers/scsi/osd/osd_initiator.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
    index fda4de3..e88bbdd 100644
    --- a/drivers/scsi/osd/osd_initiator.c
    +++ b/drivers/scsi/osd/osd_initiator.c
    @@ -865,7 +865,7 @@ void osd_req_read(struct osd_request *or,
    {
    _osd_req_encode_common(or, OSD_ACT_READ, obj, offset, len);
    WARN_ON(or->in.bio || or->in.total_bytes);
    - WARN_ON(1 == (bio->bi_rw & REQ_WRITE));
    + WARN_ON(bio->bi_rw & REQ_WRITE);
    or->in.bio = bio;
    or->in.total_bytes = len;
    }
    --
    1.7.2.1



    \
     
     \ /
      Last update: 2010-08-12 14:33    [W:0.034 / U:31.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site