From patchwork Tue Mar 8 13:43:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12773841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3C2DC433EF for ; Tue, 8 Mar 2022 13:44:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9D518D000B; Tue, 8 Mar 2022 08:44:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD5188D0009; Tue, 8 Mar 2022 08:44:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D78E8D000B; Tue, 8 Mar 2022 08:44:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 86AA08D0009 for ; Tue, 8 Mar 2022 08:44:09 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4B4761828FDAD for ; Tue, 8 Mar 2022 13:44:09 +0000 (UTC) X-FDA: 79221337818.18.B858AB2 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf12.hostedemail.com (Postfix) with ESMTP id 9AECA40004 for ; Tue, 8 Mar 2022 13:44:08 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KCc2r2hVnzdg12; Tue, 8 Mar 2022 21:42:44 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 8 Mar 2022 21:44:06 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH v2 8/8] mm/z3fold: remove unneeded PAGE_HEADLESS check in free_handle() Date: Tue, 8 Mar 2022 21:43:11 +0800 Message-ID: <20220308134311.59086-9-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220308134311.59086-1-linmiaohe@huawei.com> References: <20220308134311.59086-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9AECA40004 X-Stat-Signature: 5bbzack65x8ehrc8u9wjpoofzunk7ozh Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf12.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-HE-Tag: 1646747048-159508 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The only caller z3fold_free() never calls free_handle() in PAGE_HEADLESS case. Remove this unneeded check. Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool --- mm/z3fold.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 867c590df027..83b5a3514427 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -297,9 +297,6 @@ static inline void free_handle(unsigned long handle, struct z3fold_header *zhdr) int i; bool is_free; - if (handle & (1 << PAGE_HEADLESS)) - return; - if (WARN_ON(*(unsigned long *)handle == 0)) return;