From patchwork Tue Dec 27 16:04:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489479 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 7B4FC62AB0 for ; Tue, 27 Dec 2016 16:06:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CF7525F31 for ; Tue, 27 Dec 2016 16:06:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61BA225D99; Tue, 27 Dec 2016 16:06:34 +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 0B5902094F for ; Tue, 27 Dec 2016 16:06:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932882AbcL0QGS (ORCPT ); Tue, 27 Dec 2016 11:06:18 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35659 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932461AbcL0QF6 (ORCPT ); Tue, 27 Dec 2016 11:05:58 -0500 Received: by mail-pg0-f68.google.com with SMTP id i5so12801606pgh.2; Tue, 27 Dec 2016 08:05:58 -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=61wWQYO1Z7Iw0Uzq10Aaws0+ofWAFQV19ovUUJI5Gk4=; b=JH6vynaQ1H4p0fJ1EdxlSDmiVs06zW56I3xR7iHNgGpLmiK5Mdv8oyIcAlnjgHS8WA b6XW7hR6lrHGXHhKyIcBJfmDrvpbMDdUz2W9SVOkyDddAa+3PxdIlCIPV+T9wkwvhKO5 2GDxk5N4DNoZ51KYR2p17kygepXQRn7w8KjY46lXknE5HM5Pxh6ocJGw/9PE08n440Dg YuWCX0ROxNm2ruOz4rlbi1+ks1YrIUZ74iJccTtqfzz7TdL0s/HbR87Q33QpcAFQAFeP 4BTq22NG84KmXNfAtUhU36W0h3p/H9SNBBUVHqh/TTu0RmQkBP/9nyWpAVhOlOfUtzzs y2HQ== 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=61wWQYO1Z7Iw0Uzq10Aaws0+ofWAFQV19ovUUJI5Gk4=; b=bOiTeXTduCI4uyegCkZ25fsCqn3mLYMv3vune1x+gsuM9QAooWVZLx0Ty5m/R2oAzP VMDvr8/NcaZZkfDpl5FGrrQMQ+dlspzwV8iCmM8/aVUUREYtjj9Wq/207X8zpyOEJqcd dfYLPuBX9r4ZSr8i0kv84qK7O5Cvww81nFQdMiYxFUPKuwSYDsE1B7wC7LfIxuUT3+T/ 4sMqaEDtC+O9KLywxO8VuvHaRW9Li3PZ0LbgjLctjXBPl1ydJMNHiuEnpsfNOBtT3In/ 9GS4ix7SF0zi2yFWjHbf1HCaKWMIzxr2SMrudDewg65kxmZroeeeLIx2ogP2DpI7ppVF FcEA== X-Gm-Message-State: AIkVDXJwBMwfxQCS3IdQm46UT7FWiSSHtNVMP3YXxrrsAl0vvnxbA44br68obk++J+JD/w== X-Received: by 10.98.192.208 with SMTP id g77mr19331458pfk.118.1482854753031; Tue, 27 Dec 2016 08:05:53 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id p1sm91391563pgc.29.2016.12.27.08.05.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:05:51 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH v1 36/54] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages() Date: Wed, 28 Dec 2016 00:04:45 +0800 Message-Id: <1482854706-14128-5-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 The bio is always freed after running crypt_free_buffer_pages(), so it isn't necessary to clear the bv->bv_page. Signed-off-by: Ming Lei --- drivers/md/dm-crypt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 7c6c57216bf2..593cdf88bf5f 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1042,7 +1042,6 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone) bio_for_each_segment_all(bv, clone, i) { BUG_ON(!bv->bv_page); mempool_free(bv->bv_page, cc->page_pool); - bv->bv_page = NULL; } }