Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758182AbcDEL6w (ORCPT ); Tue, 5 Apr 2016 07:58:52 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36438 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755878AbcDEL6u (ORCPT ); Tue, 5 Apr 2016 07:58:50 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , Philipp Reisner , Lars Ellenberg , drbd-dev@lists.linbit.com (open list:DRBD DRIVER) Subject: [PATCH 02/27] block: drbd: use bio_get_base_vec() to retrieve the 1st bvec Date: Tue, 5 Apr 2016 19:56:47 +0800 Message-Id: <1459857443-20611-3-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> References: <1459857443-20611-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: 833 Lines: 22 Signed-off-by: Ming Lei --- drivers/block/drbd/drbd_bitmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 92d6fc0..ccbd1e0 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -938,7 +938,9 @@ static void drbd_bm_endio(struct bio *bio) struct drbd_bm_aio_ctx *ctx = bio->bi_private; struct drbd_device *device = ctx->device; struct drbd_bitmap *b = device->bitmap; - unsigned int idx = bm_page_to_idx(bio->bi_io_vec[0].bv_page); + /* single bvec bio */ + const struct bio_vec *bvec = bio_get_base_vec(bio); + unsigned int idx = bm_page_to_idx(bvec->bv_page); if ((ctx->flags & BM_AIO_COPY_PAGES) == 0 && !bm_test_page_unchanged(b->bm_pages[idx])) -- 1.9.1