All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag
Date: Sat, 10 Nov 2018 09:30:44 +0100	[thread overview]
Message-ID: <20181110083049.17475-2-hch@lst.de> (raw)
In-Reply-To: <20181110083049.17475-1-hch@lst.de>

They way these functions abuse ->special to try to store the dummy
request looks completely broken, given that it actually stores the
original scsi command.

Instead switch to ->host_scribble and store the actual dummy command.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/fnic/fnic_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 96acfcecd540..cafbcfb85bfa 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -2274,7 +2274,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
 		return SCSI_NO_TAG;
 
 	sc->tag = sc->request->tag = dummy->tag;
-	sc->request->special = sc;
+	sc->host_scribble = (unsigned char *)dummy;
 
 	return dummy->tag;
 }
@@ -2286,7 +2286,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
 static inline void
 fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc)
 {
-	struct request *dummy = sc->request->special;
+	struct request *dummy = (struct request *)sc->host_scribble;
 
 	blk_mq_free_request(dummy);
 }
-- 
2.19.1

  reply	other threads:[~2018-11-10  8:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10  8:30 remove most req->special users v2 Christoph Hellwig
2018-11-10  8:30 ` Christoph Hellwig [this message]
2018-11-10  8:30 ` [PATCH 2/6] nullb: remove leftover legacy request code Christoph Hellwig
2018-11-10  8:30 ` [PATCH 3/6] skd_main: don't use req->special Christoph Hellwig
2018-11-10  8:30 ` [PATCH 4/6] aoe: replace ->special use with private data in the request Christoph Hellwig
2018-11-10  8:30 ` [PATCH 5/6] pd: " Christoph Hellwig
2018-11-10  8:30 ` [PATCH 6/6] ide: don't use req->special Christoph Hellwig
2018-11-10 15:04 ` remove most req->special users v2 Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2018-11-09 18:32 remove most req->special users Christoph Hellwig
2018-11-09 18:32 ` [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag Christoph Hellwig
2018-11-10 12:56   ` Hannes Reinecke

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=20181110083049.17475-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.