mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: akpm@linux-foundation.org
Cc: linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org,
	jirislaby@gmail.com, linux-kernel@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>,
	"James E.J. Bottomley" <James.Bottomley@suse.de>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH v2] SCSI: fix bio.bi_rw handling
Date: Thu, 12 Aug 2010 14:31:05 +0200	[thread overview]
Message-ID: <1281616266-4709-2-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1281616266-4709-1-git-send-email-jslaby@suse.cz>

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



  reply	other threads:[~2010-08-12 12:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 12:31 [PATCH v2] MD: raid, fix BUG caused by flags handling Jiri Slaby
2010-08-12 12:31 ` Jiri Slaby [this message]
2010-08-12 13:30   ` [PATCH v2] SCSI: fix bio.bi_rw handling Jeff Moyer
2010-08-12 16:06   ` Christoph Hellwig
2010-08-12 12:31 ` [PATCH v2] BLOCK: " Jiri Slaby
2010-08-12 13:35   ` Jeff Moyer
2010-08-12 16:08   ` Christoph Hellwig
2010-08-12 16:24     ` Jiri Slaby
2010-08-23 10:33   ` Jens Axboe
2010-08-12 13:26 ` [PATCH v2] MD: raid, fix BUG caused by flags handling Jeff Moyer
2010-08-12 16:05 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1281616266-4709-2-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®