From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 955D3C433C1 for ; Mon, 22 Mar 2021 01:52:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E27536190A for ; Mon, 22 Mar 2021 01:52:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E27536190A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 67D876B0036; Sun, 21 Mar 2021 21:52:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 607156B006C; Sun, 21 Mar 2021 21:52:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A8556B0070; Sun, 21 Mar 2021 21:52:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 299DE6B0036 for ; Sun, 21 Mar 2021 21:52:24 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DE34D640E for ; Mon, 22 Mar 2021 01:52:23 +0000 (UTC) X-FDA: 77945835366.37.6E2F3CE Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf28.hostedemail.com (Postfix) with ESMTP id 99FCD2000241 for ; Mon, 22 Mar 2021 01:52:21 +0000 (UTC) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F3crr4Pfyz19GQQ; Mon, 22 Mar 2021 09:50:20 +0800 (CST) Received: from [10.174.178.163] (10.174.178.163) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Mon, 22 Mar 2021 09:52:12 +0800 Subject: Re: [PATCH 1/5] mm/migrate.c: remove unnecessary VM_BUG_ON_PAGE on putback_movable_page() To: Rafael Aquini CC: , , , , References: <20210320093701.12829-1-linmiaohe@huawei.com> <20210320093701.12829-2-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: Date: Mon, 22 Mar 2021 09:52:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.163] X-CFilter-Loop: Reflected X-Stat-Signature: zir677tfrgkyip5s6arbimzzsmz4eppp X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 99FCD2000241 Received-SPF: none (huawei.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=szxga04-in.huawei.com; client-ip=45.249.212.190 X-HE-DKIM-Result: none/none X-HE-Tag: 1616377941-431443 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: On 2021/3/20 22:11, Rafael Aquini wrote: > On Sat, Mar 20, 2021 at 05:36:57AM -0400, Miaohe Lin wrote: >> The !PageLocked() check is implicitly done in PageMovable(). Remove this >> explicit one. >> > > I'd just keep the explicit assertion in place, regardless. > But if you're going to stick with this patch, please fix it because it's > removing the wrong assertion. Many thanks for your reply. I should have a coffee when I make this patch! :( Will fix it. Many thanks for remind! > > >> Signed-off-by: Miaohe Lin >> --- >> mm/migrate.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/mm/migrate.c b/mm/migrate.c >> index 47df0df8f21a..e4ca5ef508ea 100644 >> --- a/mm/migrate.c >> +++ b/mm/migrate.c >> @@ -146,7 +146,6 @@ void putback_movable_page(struct page *page) >> struct address_space *mapping; >> >> VM_BUG_ON_PAGE(!PageLocked(page), page); >> - VM_BUG_ON_PAGE(!PageMovable(page), page); >> VM_BUG_ON_PAGE(!PageIsolated(page), page); >> >> mapping = page_mapping(page); >> -- >> 2.19.1 >> >> > > . >