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=unavailable 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 4085BC433DB for ; Mon, 22 Mar 2021 01:53:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16B3F6190A for ; Mon, 22 Mar 2021 01:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbhCVBwo (ORCPT ); Sun, 21 Mar 2021 21:52:44 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14116 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbhCVBwU (ORCPT ); Sun, 21 Mar 2021 21:52:20 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> > > . >