Message ID | 20220704132201.14611-17-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5CB22C43334 for <linux-mm@archiver.kernel.org>; Mon, 4 Jul 2022 13:22:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF9846B0089; Mon, 4 Jul 2022 09:22:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E83476B0087; Mon, 4 Jul 2022 09:22:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D49296B008C; Mon, 4 Jul 2022 09:22:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C02036B0087 for <linux-mm@kvack.org>; Mon, 4 Jul 2022 09:22:22 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 9A7DB605BE for <linux-mm@kvack.org>; Mon, 4 Jul 2022 13:22:22 +0000 (UTC) X-FDA: 79649481324.01.3E35D00 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf08.hostedemail.com (Postfix) with ESMTP id E781B16000A for <linux-mm@kvack.org>; Mon, 4 Jul 2022 13:22:21 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Lc5wh4FV5zTgXr; Mon, 4 Jul 2022 21:18: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.2375.24; Mon, 4 Jul 2022 21:22:18 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org> CC: <shy828301@gmail.com>, <willy@infradead.org>, <zokeefe@google.com>, <songmuchun@bytedance.com>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH v3 16/16] mm/huge_memory: use helper macro IS_ERR_OR_NULL in split_huge_pages_pid Date: Mon, 4 Jul 2022 21:22:01 +0800 Message-ID: <20220704132201.14611-17-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220704132201.14611-1-linmiaohe@huawei.com> References: <20220704132201.14611-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656940942; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NG1liEc88B3xqhrHfMRopTb1e0ekMr/qfQ2BfpqAsKc=; b=Mxg6yTciFIdVgT75X2R6fNa9JK0zY8ia29//IQT2j60f+o0v5a7cl/C4Yq+CM0YmhJ8JhK uci02pn3lDM78z/K/uQJdfDWhaJY4dPb0lEOFyedNP+eqXGNUbyHb83LOCwxcjVrlZOPt4 WRWSt+k6haYFl2N4kcaNRbrcIcsGguE= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656940942; a=rsa-sha256; cv=none; b=hz2M1Re67hGjjNKdu9UiI/vL0dNid2VO1rI1r1nFwiYnXBHQn2w+iScaTPaATncTwS+Fcp CtvnA3gCEhUZvTnjlkoV5quwnMIdFJqh/udy+Gk6SfTKFEVjX/dZaTMgggcgyzn0Jud/Nu MPxCUQhcgJmWBILcqcq7icjP/IHwDrE= X-Rspam-User: X-Rspamd-Queue-Id: E781B16000A Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Stat-Signature: shjieg9uhseatu7wcsgkckk3xs5c3a1f X-Rspamd-Server: rspam08 X-HE-Tag: 1656940941-354640 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: <linux-mm.kvack.org> |
Series |
A few cleanup patches for huge_memory
|
expand
|
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 8380912b39fd..fd9d502aadc4 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3062,9 +3062,7 @@ static int split_huge_pages_pid(int pid, unsigned long vaddr_start, /* FOLL_DUMP to ignore special (like zero) pages */ page = follow_page(vma, addr, FOLL_GET | FOLL_DUMP); - if (IS_ERR(page)) - continue; - if (!page || is_zone_device_page(page)) + if (IS_ERR_OR_NULL(page) || is_zone_device_page(page)) continue; if (!is_transparent_hugepage(page))