Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966335AbcJ2IPu (ORCPT ); Sat, 29 Oct 2016 04:15:50 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35416 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934358AbcJ2IPn (ORCPT ); Sat, 29 Oct 2016 04:15:43 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Alexander Viro Subject: [PATCH 49/60] fs/direct-io: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:48 +0800 Message-Id: <1477728600-12938-50-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-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: 662 Lines: 22 Signed-off-by: Ming Lei --- fs/direct-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index fb9aa16a7727..cfad1ac8fa53 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -487,7 +487,9 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) err = bio->bi_error; bio_check_pages_dirty(bio); /* transfers ownership */ } else { - bio_for_each_segment_all(bvec, bio, i) { + struct bvec_iter_all bia; + + bio_for_each_segment_all_rd(bvec, bio, i, bia) { struct page *page = bvec->bv_page; if (dio->op == REQ_OP_READ && !PageCompound(page) && -- 2.7.4