Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932942AbcDEMIl (ORCPT ); Tue, 5 Apr 2016 08:08:41 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33051 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758315AbcDEMIh (ORCPT ); Tue, 5 Apr 2016 08:08:37 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH 18/27] dm: dm-io.c: use bio_get_base_vec() Date: Tue, 5 Apr 2016 20:07:33 +0800 Message-Id: <1459858062-21075-4-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> References: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 683 Lines: 25 Signed-off-by: Ming Lei --- drivers/md/dm-io.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 06d426e..6b0e466 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -221,7 +221,12 @@ static void bio_dp_init(struct dpages *dp, struct bio *bio) { dp->get_page = bio_get_page; dp->next_page = bio_next_page; - dp->context_ptr = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter); + + /* + * need to fix both bio_get_page() and bio_next_page() + * before multipage bvecs + */ + dp->context_ptr = bio_get_base_vec(bio); dp->context_u = bio->bi_iter.bi_bvec_done; } -- 1.9.1