From patchwork Sat Oct 29 08:08:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B92A260587 for ; Sat, 29 Oct 2016 08:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A52B729D0F for ; Sat, 29 Oct 2016 08:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9846F2A5D7; Sat, 29 Oct 2016 08:20:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46C7329D0F for ; Sat, 29 Oct 2016 08:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965925AbcJ2IU1 (ORCPT ); Sat, 29 Oct 2016 04:20:27 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35997 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966298AbcJ2IPr (ORCPT ); Sat, 29 Oct 2016 04:15:47 -0400 Received: by mail-pf0-f193.google.com with SMTP id n85so3390938pfi.3; Sat, 29 Oct 2016 01:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S/DP+g1ogo9gb7JZBWs0AWzBadxUgi6+Kv/UCaJs9rg=; b=SDDG7TTwaz8Yl1h3RR8KoXo5uGqCjxZn+UftP2h3qpUGPC+gvfVGoz2goYKawKt5ba puETjNKQraJpk7ERjenByaoO2PB08J1CCfnXGfMQvWhbBWz1xSeITUZCGxDTxkBPOZcU 4IVwfAtlTqPzY8hTZHIODAn1MHqpdVSNhF8pZ3uPflg3pVpAF/SF63vFRf4+hULS9Ye0 PPnFSgGMI9GwFoKp2Qh5actWi354AXsp4s+oUXIuKlliT1x1wKk7toYbXsKu0TCLWOKV TbZKBJ32RwuKYfyX5zD2oGOm3RBGG9ABwFVTQPXVsN3PRtGYXVXyGDdEWWaHCczZIyv1 zC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S/DP+g1ogo9gb7JZBWs0AWzBadxUgi6+Kv/UCaJs9rg=; b=Z1Q6yRqjxfZFgBViFJS4zIrm5v+4iE9FmrMeTKufR6srE2gVuh2RnnVZrJeddnEHA+ qKzbu8kPxsdncXJXK8Mujh03sItZlHyQuf83UMUak+hTin0WAOZRRRibNsTnu+AVFrVJ Vxs2mfiQ1kvOFQs2frX0lUvFRA8otdG5M7RreYq5YMnhoOR3v88TTQ+X/yi6vlVlkD6W C6hTQdQ/JiAjM2OjEl1eBV3BpavMbPztjcYuez0RDfAGrRo76xdkFt357obmQ95pSMuL DoDqkt83YZFCPpgsfDQP+T5rWt4deXbRsmzGW0uIsODXMScCYm/iH9g2WRqmfeeub6qu xmXw== X-Gm-Message-State: ABUngveo7tnhQvAd9/QhC29L8ZpmIO69DOuhs89xxwIiXUc7c183lD1vrZ26eg7YFT42EA== X-Received: by 10.99.170.13 with SMTP id e13mr26151596pgf.68.1477728946957; Sat, 29 Oct 2016 01:15:46 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id 73sm23520052pfn.45.2016.10.29.01.15.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:15:46 -0700 (PDT) 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 , "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org (open list:EXT4 FILE SYSTEM) Subject: [PATCH 50/60] ext4: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:49 +0800 Message-Id: <1477728600-12938-51-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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- fs/ext4/page-io.c | 3 ++- fs/ext4/readpage.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 0094923e5ebf..abde26af55e7 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -63,8 +63,9 @@ static void ext4_finish_bio(struct bio *bio) { int i; struct bio_vec *bvec; + struct bvec_iter_all bia; - bio_for_each_segment_all(bvec, bio, i) { + bio_for_each_segment_all_rd(bvec, bio, i, bia) { struct page *page = bvec->bv_page; #ifdef CONFIG_EXT4_FS_ENCRYPTION struct page *data_page = NULL; diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index a81b829d56de..b30444fd9333 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -71,6 +71,7 @@ static void mpage_end_io(struct bio *bio) { struct bio_vec *bv; int i; + struct bvec_iter_all bia; if (ext4_bio_encrypted(bio)) { if (bio->bi_error) { @@ -80,7 +81,7 @@ static void mpage_end_io(struct bio *bio) return; } } - bio_for_each_segment_all(bv, bio, i) { + bio_for_each_segment_all_rd(bv, bio, i, bia) { struct page *page = bv->bv_page; if (!bio->bi_error) {