Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp484070ybx; Tue, 5 Nov 2019 00:26:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwCR9uk0SO5t2m7JoIhmqFlH8skPBnHF59hLTF6cmN5flabeGoeA9WbuLxwN5eM8VQH0V9k X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr8878402eji.283.1572942372823; Tue, 05 Nov 2019 00:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572942372; cv=none; d=google.com; s=arc-20160816; b=YSgtq83Z1mdQTfEQE0k38BoZRGTVfpWwyQXdsBwHjnNXySMIvyxZaboumBZ02IxPST lmlAjpji2i3hRIZzXryQ99YSD3JOK1c+Z9NTezIsjN75L1w4gsmyNKdcJ2TntLdGtFGK wifxCsDHDbng8+lFmgATdoq6Y6iYeFqMzBhEL7iKZiEYtAZ/x5GvlBdGdYEoPJhdBCkh 9mIvG8wACDZ+yySqiYQ3S0UkbiWiaffmWTlA/yLWOnkfqpdAm9j4epivkr4VFjAJRJ+/ z2tSlo0VwQKy5961pBIIuoFIU1oXwMiaoDM6yxuJiOEPxfIHtRmgNnwJW+4/7T6L4Npj 2tlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject:cc :to:from; bh=lL3v6KlkSgMx8SM1zAik1b/9D4zGrn66pAK+Km/kEf4=; b=mRwMhlABsuw4W4Kc7cVkoXuhO9gsLCP7BlpRMg2fLKyDCzbr+kgh9xxsPgnQB8ah5z rVewEUlUgbKwbxa0jjSLynz7yc8vDuv270YT5C55EwmefYr2/cFiEQKiwTSI0+ZmOA5b WvKGuy/+jbsH4yD+eOKmazbsYX4rdUXA77T4Lp+yi/xuOViAcGSjffvOx48FE+oNgm0A x3ivC2P4QrH3w7IJixkqnXJpit4muZmu/mLCh0mKsJDEjXBmzjz5ezNigvdGbYzW5e+W Cc/35zBHBVScuTiAamQiI66vLB6S24c3RCNdi+eC/24tI6mwu2Xt4lJwDbROV8LW5meh JE3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si10434489eda.192.2019.11.05.00.25.49; Tue, 05 Nov 2019 00:26:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387918AbfKEIV7 (ORCPT + 99 others); Tue, 5 Nov 2019 03:21:59 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6153 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387484AbfKEIV7 (ORCPT ); Tue, 5 Nov 2019 03:21:59 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1660419F54FEFA14DB0E; Tue, 5 Nov 2019 16:21:57 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 16:21:46 +0800 From: Yunfeng Ye To: CC: , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" Subject: [PATCH] mm/memory-failure.c: replace with page_shift() in add_to_kill() Message-ID: <7bc9d610-728c-37b0-d175-dba21dc0dfff@huawei.com> Date: Tue, 5 Nov 2019 16:21:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function page_shift() is supported after the commit 94ad9338109f ("mm: introduce page_shift()"). So replace with page_shift() in add_to_kill() for readability. Signed-off-by: Yunfeng Ye --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 3151c87dff73..e48c50cac889 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -326,7 +326,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p, if (is_zone_device_page(p)) tk->size_shift = dev_pagemap_mapping_shift(p, vma); else - tk->size_shift = compound_order(compound_head(p)) + PAGE_SHIFT; + tk->size_shift = page_shift(compound_head(p)); /* * Send SIGKILL if "tk->addr == -EFAULT". Also, as -- 2.7.4