[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4F69C630.3000604@kernel.org>
Date: Wed, 21 Mar 2012 20:14:40 +0800
From: Shaohua Li <shli@...nel.org>
To: Vivek Goyal <vgoyal@...hat.com>,
"axboe@...nel.dk" <axboe@...nel.dk>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"neilb@...e.de" <neilb@...e.de>, martin.petersen@...cle.com
Subject: [patch 2/2]scsi: use correct API to get request position and size
Let sd driver use correct API to get request position and size.
Signed-off-by: Shaohua Li <shli@...ionio.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists