Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp549704ybx; Tue, 5 Nov 2019 01:39:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwiDkg1+FzbccX48WDqFCVM2upXQ2xRFbp+MYN3d4bUaFoDLQkWHkN2NnGRziBqW5wn+wQD X-Received: by 2002:aa7:cd54:: with SMTP id v20mr9223454edw.203.1572946797883; Tue, 05 Nov 2019 01:39:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572946797; cv=none; d=google.com; s=arc-20160816; b=0BcqVRKf99rPfIsnsRwHIaDAchrB+LzMFDPKt52dFKIQf75fkVkiw9IEMYGgD+oMIZ rSwFB6IYn+Z8OACtYt9BMbWH/8Xu3O4xLGufPYaxTMARFKEbwVbiCAAYJdg+iJv+9kr7 7GfewNGiX85vjLEdrqFYAZDxBoBPuavfb6xUIpH+vJQp95AdtRFgXewqp7wKiFhleMEZ nsyK1CZDxQoC5U/AuaS1VLGvL5XhewMFiAaAa0T6rmhFziGZqjvt9JCWRaEEcP1GK8Iw zONKi99/l5DJAo8IZ8YnCb8QB+7b9xzD4p3dSo19e7Q6ZOw1V+kFWYwiDEFHO/u/Kujp SVxA== 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:cc:to :subject:from; bh=xZwR7Ms3tM7B/9l9dNGBBRjuoATaGe7urd38lqdksg8=; b=I+gLfFUD14xHrXbfqafA5RF1sijuIAetasKnsN83dHP9JckwvUkbdlLwAZI1cqWY3v /RlTn4IAPECEgYRJEJ3kl1P117Fcu7TQe5GnztTjcyB8fQRJFY4USE6eudZJ2rVyiBRm DWKbPXOW99e8RTZ9fbafcYgLkKvOMEJBMo1OK1Teku1uxtj/OKurc+4GRQtmxR/R/gWP 8DIBxZLX9Q8zoBLOkOk0Er2/JDCjNC9QXjuFfrFd4KNM0alC5ZTuuoHpt5KO1zEurH5Q J9xbXpnIP8ZM8R9va5pT89xxOt31puR20R2l7LO0CfbmqefSIAFkJiWCR523JeCojer+ Nnzw== 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 p48si9635225eda.80.2019.11.05.01.39.33; Tue, 05 Nov 2019 01:39:57 -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 S1730881AbfKEJiy (ORCPT + 99 others); Tue, 5 Nov 2019 04:38:54 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5271 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730808AbfKEJix (ORCPT ); Tue, 5 Nov 2019 04:38:53 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0D1BC571BAF4CB88C1DC; Tue, 5 Nov 2019 17:38:52 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 17:38:43 +0800 From: Yunfeng Ye Subject: [PATCH v2] mm/memory-failure.c: replace with page_shift() in add_to_kill() To: , CC: , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" Message-ID: <543d8bc9-f2e7-3023-7c35-2e7ed67c0e82@huawei.com> Date: Tue, 5 Nov 2019 17:38:29 +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 Reviewed-by: David Hildenbrand Acked-by: Naoya Horiguchi --- v1 -> v2: - add Reviewed-by and Acked-by 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