Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3093785pxf; Sun, 21 Mar 2021 18:54:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9QDEkz+xcQPK9PugNgYq+lqJZ8548XFO2zIL0wfkjaKCSr+7nnVxnQ7cj0uFqRmyFYCiy X-Received: by 2002:a17:906:b20b:: with SMTP id p11mr17160280ejz.0.1616378044609; Sun, 21 Mar 2021 18:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616378044; cv=none; d=google.com; s=arc-20160816; b=YnZ00wwLCgcLKAZZPHcwO1Ne/kQ92uBPeSo/MGgOfGLY1+LRZjc7E81MI0oD6H9Qbz ad9Vlz0iX27SlEC88zdMYrzFxRBUMpVkMxApkBcWhHLlEGfvt4A0FQgt+aK8xQ6th0Qe RO1Vs11DmDrTn03+P4LKF70BOZPV+eWkFWpp6Kmm/8jadhxWsYJmjYfXzaD/wkgUILDk vzhkXdpyqgpJPAAvVk3KAQnO14s03TEyrUFao+nixwz/gnrP8ipapnfdh3WCKdKtd/R0 uWAdeFDLdtSDyzCy1eBN5ynUve6yQlbnmhObTrqvsLe5ZPBWS0ROexYfCtNLz+EDYBPh c1cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=q42BSVAG1wCNj4P9Y9zPUmRo7X5sqN2+Xci4X6jYxnQ=; b=b8Q7XceTfmPZ8pno+9nUG8eXlaiIw/S5pK5D5BjrkXvfmZltRsCgo84DWOlqNiEa5B UuxnH/WYbHDWAEsD91yhMP83fgfkDqIzdu+rq1gjbdXLuz98GkOv76Lj84E6fv+azGZ9 rplDuf6SV1wNdL4RQAZLXxrwXggHqNbbP+LcR2s3sjNi9quL0fFbtMFqnq7erE/64NIQ GBiTh+q9cMMHcNfSvasXYIXcamVq31r5SCqXF2KjUUx83iCiAvl1CpcVlj5jRygJwBL4 TtQ/34HaMavntfcY37SkQJKzzwT2GM3+BZwFjp2CXC3UaWDcmjQ+SAAl5zoQ5LQLbNJ3 8UwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si10111096edd.229.2021.03.21.18.53.42; Sun, 21 Mar 2021 18:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbhCVBwn (ORCPT + 99 others); Sun, 21 Mar 2021 21:52:43 -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 >> >> > > . >