[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460635375-28282-5-git-send-email-tom.leiming@gmail.com>
Date: Thu, 14 Apr 2016 20:02:22 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Jens Axboe <axboe@...com>, linux-kernel@...r.kernel.org
Cc: linux-block@...r.kernel.org, Christoph Hellwig <hch@...radead.org>,
Ming Lei <tom.leiming@...il.com>,
Jarod Wilson <jarod@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>, Tejun Heo <tj@...nel.org>,
Miklos Szeredi <mszeredi@...e.cz>, NeilBrown <neilb@...e.de>
Subject: [PATCH v1 04/27] block: loop: use bio_get_base_vec() to retrive bvec table
Signed-off-by: Ming Lei <tom.leiming@...il.com>
---
drivers/block/loop.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 7e5e27a..e2e9dcd 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -477,7 +477,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
loff_t pos, bool rw)
{
struct iov_iter iter;
- struct bio_vec *bvec;
+ const struct bio_vec *bvec;
struct bio *bio = cmd->rq->bio;
struct file *file = lo->lo_backing_file;
int ret;
@@ -485,7 +485,8 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
/* nomerge for loop request queue */
WARN_ON(cmd->rq->bio != cmd->rq->biotail);
- bvec = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
+ /* passed to iterate_bvec() */
+ bvec = bio_get_base_vec(bio);
iov_iter_bvec(&iter, ITER_BVEC | rw, bvec,
bio_segments(bio), blk_rq_bytes(cmd->rq));
--
1.9.1
Powered by blists - more mailing lists