From patchwork Tue Dec 27 16:04:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489575 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 6EF17601D2 for ; Tue, 27 Dec 2016 16:11:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61C04200E7 for ; Tue, 27 Dec 2016 16:11:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5692E25E13; Tue, 27 Dec 2016 16:11:56 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 07DEE200E7 for ; Tue, 27 Dec 2016 16:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932995AbcL0QGw (ORCPT ); Tue, 27 Dec 2016 11:06:52 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35966 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932984AbcL0QGr (ORCPT ); Tue, 27 Dec 2016 11:06:47 -0500 Received: by mail-pg0-f67.google.com with SMTP id n5so12811357pgh.3; Tue, 27 Dec 2016 08:06:46 -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=Zmc6tIN2DFD7w4PSVpymxUDpIx3SKk0APZqF6sR+X6o=; b=uRHoRZ8nqFt8SAdT5j29Dy0gCvXhDhqec9dHig5MnFkmXq6b9ZaZJjWgiah6wwftA5 YGW+69ECq/+g1A90vnqp8vvhCw8tajdOiZ1QwfCAZyL//32fQ+NZt0ROqR6GzsFQdSbI puDbdyg/Dz1aFy3IkaOf30YhQM7TLC2QWZ9CA5TjcKtMD3YdoBlHoq+18k91jxKMEJ84 9Kj0gnMFywFMNU42d2zoF04uAGaXUT4qOi760tsL8SKUQ8b0gxPoCfPtp++K7fP5FEG3 FCrJpK3SIK+IAJAsHEEXZZMsDuKd5oSXugjfdMzrKMuKPr+H5tbdBVMZlJIrv/FrQufi kEdQ== 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=Zmc6tIN2DFD7w4PSVpymxUDpIx3SKk0APZqF6sR+X6o=; b=Ig8CdMJxqj6SwjbHvVLpBJDGESybagfnnTAjD3VkzTersnDDRLHAYUry1EOQadGLKv Rojd2CnZYp/aU5qzP5XUEmEY2mmO7q9S7i3j2YZ9GVTO7Q664MJpmiNqkDuoveijBW3R jUb0DyQqMNvZpH/5MGtw8z65/Xll2hkgFOpQ/RXVbGUS1IaNMBGwUydqjJlFdhuE4tfu ll0pmB6EWn04WUftzwyHwHu4OnlbpUdUAqNjlp01HhTcDognjqmrjciCzkMxBBheHu7A UqIiT9OwSVUz7O3HAJfbNana5zqgyDgsymk1SfkfUfWK/wqG710wahEpf+cu5yR4zaa0 ZLzw== X-Gm-Message-State: AIkVDXKDcB/lZxrbTiOWK8k7/G/wZk8yUiF/QVpEOZniE0MXk2pERL2tMeq2pd9ZcA45ow== X-Received: by 10.98.77.67 with SMTP id a64mr27259593pfb.124.1482854806493; Tue, 27 Dec 2016 08:06:46 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id n8sm70121697pgc.0.2016.12.27.08.06.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:06:45 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , "Theodore Y. Ts'o" , Jaegeuk Kim , linux-fsdevel@vger.kernel.org (open list:FS-CRYPTO: FILE SYSTEM LEVEL ENCRYPTION SUPPORT) Subject: [PATCH v1 46/54] fs: crypto: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:55 +0800 Message-Id: <1482854706-14128-15-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-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/crypto/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index ac8e4f6a3773..4bb1d7eff6f4 100644 --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c @@ -453,8 +453,9 @@ static void completion_pages(struct work_struct *work) struct bio *bio = ctx->r.bio; struct bio_vec *bv; int i; + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, bio, i) { + bio_for_each_segment_all_sp(bv, bio, i, bia) { struct page *page = bv->bv_page; int ret = fscrypt_decrypt_page(page->mapping->host, page, PAGE_SIZE, 0, page->index);