All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2]scsi: use correct API to get request position and size
@ 2012-03-21 12:14 Shaohua Li
  0 siblings, 0 replies; only message in thread
From: Shaohua Li @ 2012-03-21 12:14 UTC (permalink / raw)
  To: Vivek Goyal, axboe@kernel.dk
  Cc: linux-kernel@vger.kernel.org, neilb@suse.de, martin.petersen


Let sd driver use correct API to get request position and size.

Signed-off-by: Shaohua Li <shli@fusionio.com>
---
  drivers/scsi/sd.c |    5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux/drivers/scsi/sd.c
===================================================================
--- linux.orig/drivers/scsi/sd.c	2012-03-21 18:09:55.302320287 +0800
+++ linux/drivers/scsi/sd.c	2012-03-21 18:17:50.705774450 +0800
@@ -539,9 +539,8 @@ static void sd_config_discard(struct scs
  static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct 
request *rq)
  {
  	struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
-	struct bio *bio = rq->bio;
-	sector_t sector = bio->bi_sector;
-	unsigned int nr_sectors = bio_sectors(bio);
+	sector_t sector = blk_rq_pos(rq);
+	unsigned int nr_sectors = blk_rq_sectors(rq);
  	unsigned int len;
  	int ret;
  	char *buf;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-21 12:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 12:14 [patch 2/2]scsi: use correct API to get request position and size Shaohua Li

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.