From patchwork Mon Aug 9 10:46:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 12426219 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=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 BDAB4C4338F for ; Mon, 9 Aug 2021 10:46:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 417AA60C3E for ; Mon, 9 Aug 2021 10:46:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 417AA60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8F0E76B006C; Mon, 9 Aug 2021 06:46:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A15E6B0071; Mon, 9 Aug 2021 06:46:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B7688D0001; Mon, 9 Aug 2021 06:46:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 5EC0C6B006C for ; Mon, 9 Aug 2021 06:46:06 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F18258249980 for ; Mon, 9 Aug 2021 10:46:05 +0000 (UTC) X-FDA: 78455212290.06.0BA25EE Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) by imf13.hostedemail.com (Postfix) with ESMTP id 58975100A11C for ; Mon, 9 Aug 2021 10:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:Subject :From; bh=+MinV0OqyhZKB/6ILPnbXLBy7PE/pthP+8hU4YA1Y5w=; b=Evb/rDmJ0dSj1YQsIh4 jnW17qSVSdOiX7CtxlAxi9jOg2BJGgs4iDCg2Gey45lgxrgFfjJ26dTLDHkZa1pNlsqSXDm8/b6/6 //83YZGr+vS5g7kqcA+kdB6Y/Gb3fKagw4sWivHtSPrd72gjSFc5ihPHntbLUpeT7mp4Sj2xowc=; Received: from [10.93.0.56] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mD2nA-006q0n-VV; Mon, 09 Aug 2021 13:46:00 +0300 From: Vasily Averin Subject: [PATCH] mm: use in_task() in mempolicy_slab_node() To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org Message-ID: <984ee771-4834-21da-801f-c15c18ddf4d1@virtuozzo.com> Date: Mon, 9 Aug 2021 13:46:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Language: en-US X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 58975100A11C Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=virtuozzo.com header.s=relay header.b="Evb/rDmJ"; dmarc=pass (policy=quarantine) header.from=virtuozzo.com; spf=pass (imf13.hostedemail.com: domain of vvs@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=vvs@virtuozzo.com X-Stat-Signature: p9s6zjoqak146rndoxq9pntyf7j9zax6 X-HE-Tag: 1628505965-346880 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: Obsoleted in_intrrupt() include task context with disabled BH, it's better to use in_task() instead. Signed-off-by: Vasily Averin --- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2f8ee67..f436c53 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1922,7 +1922,7 @@ unsigned int mempolicy_slab_node(void) struct mempolicy *policy; int node = numa_mem_id(); - if (in_interrupt()) + if (!in_task()) return node; policy = current->mempolicy;