From patchwork Fri Mar 4 09:33:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12768804 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 2FDE4C433F5 for ; Fri, 4 Mar 2022 09:35:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F4D38D0003; Fri, 4 Mar 2022 04:35:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A58A8D0002; Fri, 4 Mar 2022 04:35:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 794ED8D0003; Fri, 4 Mar 2022 04:35:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 6B0618D0001 for ; Fri, 4 Mar 2022 04:35:02 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F3C768249980 for ; Fri, 4 Mar 2022 09:35:01 +0000 (UTC) X-FDA: 79206194802.19.9B3FF64 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf14.hostedemail.com (Postfix) with ESMTP id 109ED100018 for ; Fri, 4 Mar 2022 09:35:00 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4K92hf14JLzBrt6; Fri, 4 Mar 2022 17:33:06 +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; Fri, 4 Mar 2022 17:34:56 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH 00/16] A few cleanup and fixup patches for migration Date: Fri, 4 Mar 2022 17:33:53 +0800 Message-ID: <20220304093409.25829-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 109ED100018 X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf14.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Stat-Signature: o4xdps7u9mr1tfeojry59dfdwns1udka X-HE-Tag: 1646386500-279338 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: Hi everyone, This series contains a few patches to remove unneeded variables, jump label and use helper to simplify the code. Also we fix some bugs such as page refcounts leak , pte_unmap on an not mapped pte and so on. More details can be found in the respective changelogs. Thanks! Miaohe Lin (16): mm/migration: remove unneeded local variable mapping_locked mm/migration: remove unneeded out label mm/migration: remove unneeded local variable page_lru mm/migration: reduce the rcu lock duration mm/migration: fix the confusing PageTransHuge check mm/migration: use helper function vma_lookup() in add_page_for_migration mm/migration: use helper macro min_t in do_pages_stat mm/migration: avoid unneeded nodemask_t initialization mm/migration: remove some duplicated codes in migrate_pages mm/migration: remove PG_writeback handle in folio_migrate_flags mm/migration: remove unneeded lock page and PageMovable check mm/migration: fix potential page refcounts leak in migrate_pages mm/migration: return errno when isolate_huge_page failed mm/migration: fix potential invalid node access for reclaim-based migration mm/migration: fix possible do_pages_stat_array racing with memory offline mm/migration: fix potential pte_unmap on an not mapped pte include/linux/migrate.h | 2 +- include/linux/swapops.h | 4 +- mm/filemap.c | 10 +-- mm/hugetlb.c | 2 +- mm/migrate.c | 138 ++++++++++++++++------------------------ 5 files changed, 65 insertions(+), 91 deletions(-)