From patchwork Tue Dec 27 16:04:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489603 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 89B5C601D2 for ; Tue, 27 Dec 2016 16:13:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C92A201BC for ; Tue, 27 Dec 2016 16:13:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7179725D99; Tue, 27 Dec 2016 16:13:02 +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 27BF3201BC for ; Tue, 27 Dec 2016 16:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933286AbcL0QNA (ORCPT ); Tue, 27 Dec 2016 11:13:00 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34992 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932900AbcL0QGU (ORCPT ); Tue, 27 Dec 2016 11:06:20 -0500 Received: by mail-pf0-f196.google.com with SMTP id i88so18316959pfk.2; Tue, 27 Dec 2016 08:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w7uLngKDHU9JDxm++WulfqCUUI3yzofUXDIH+bBM7n4=; b=GWDz9T1gTK7Bj+PS8GCUsaNqR5JEFam+K3v3IPO5I2v34lXVO/NwSagaq4UPptZi8B J/fQsU8yDEUVXmGh/j/h1FzP/bFbxHaSSugP/+SJBzHhM+w3KBrCUzIkROb6P6rOx5PK 9RNaMXoa3d7fmtlUYVcvRIoGxwBaS8J83Too3//Hj5jK/rjyo/9VZM55yRSkXqRa0ttI uj3nXAbStuthqcj6d9MnlmAwMB51bU96p3K/Sd8p9R+mCnBNz6I+BkjiBg+NcN8aOp5D vsoUyovti9ip/tjOionW8cRxxoqOTDfn4p/gIQ7E4BVINqSKJs9z8krm+1P/I6mDtEfa /VaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w7uLngKDHU9JDxm++WulfqCUUI3yzofUXDIH+bBM7n4=; b=gJsaQmRdgNUyBGx2lvpXdC25o8vCuWnUJ/f4Fdb/10X8W4ap95wbi16M1vrrq7e1nR cdLRw89YIOB2Xni2j68wql5Msw42D8291myU8NYMfCCsihRj8kH9rIHkz6djF+gGmZIw ISXL4DR74NZeNy46y8qNAXO/jUyKi9zmLa4CDQOIn8tKyoPrHTEFe76hXlqdna7/VVb3 OFkR17tp9YEWaAmy0XpH+sjP9A5kd7RnmooyLcBkMyzIIy4b9j9OAIxUU5Q2LFRq9YMW zFK+HeDJiAc7xcNZNyiUYUFyuJnPy23FtCFMPHUNhFYQwh4KH6xibNlzIxy+z/CGFcNq pvgw== X-Gm-Message-State: AIkVDXL4Dm0dJ+6yyR0Fp8I1f3LpnegSWZPdjUZubB2gVngxJ/jJzQHzJrDhjyjYsg3A8w== X-Received: by 10.84.211.98 with SMTP id b89mr67986826pli.131.1482854779596; Tue, 27 Dec 2016 08:06:19 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id k5sm25945913pfb.81.2016.12.27.08.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:06:18 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org (open list:EXT4 FILE SYSTEM) Subject: [PATCH v1 41/54] ext4: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:50 +0800 Message-Id: <1482854706-14128-10-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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 d83b0f3c5fe9..34d24d8d63d9 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_sp(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..6d50b2ca532a 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_sp(bv, bio, i, bia) { struct page *page = bv->bv_page; if (!bio->bi_error) {