From patchwork Thu Sep 2 22:00:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12473227 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.8 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 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 9CD95C433FE for ; Thu, 2 Sep 2021 22:00:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67D01610A0 for ; Thu, 2 Sep 2021 22:00:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 67D01610A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 0AB00940017; Thu, 2 Sep 2021 18:00:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 05B026B0196; Thu, 2 Sep 2021 18:00:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E651B940017; Thu, 2 Sep 2021 18:00:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id D49286B0195 for ; Thu, 2 Sep 2021 18:00:24 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9C7E02849E for ; Thu, 2 Sep 2021 22:00:24 +0000 (UTC) X-FDA: 78544002768.31.1F1267B Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP id 5FF2D10265B5 for ; Thu, 2 Sep 2021 22:00:24 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F31060E8B; Thu, 2 Sep 2021 22:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1630620023; bh=530wtrbwbaDUSAfHQfUi395nW8RJ/urpWo/ZU01fSiU=; h=Date:From:To:Subject:In-Reply-To:From; b=eQjrZvo2zunSR217OeqQ1XyG/9Wtq+NfqLM6yL536m0zXbT8LrPYZPio/mnHxPjV1 nvturbdQI+4Ga1KPT93ed1wMFE7vJca9xBFmSwVXiRuDml1InQ3LmGBcpxlJJdE7/B nAYlI9KxWbVkHTNFhxwSdeXNpoUc7ZVAqQmqLA9I= Date: Thu, 02 Sep 2021 15:00:23 -0700 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, vvs@virtuozzo.com Subject: [patch 196/212] mm/mempolicy.c: use in_task() in mempolicy_slab_node() Message-ID: <20210902220023.TyvJBPEbZ%akpm@linux-foundation.org> In-Reply-To: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=eQjrZvo2; spf=pass (imf13.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5FF2D10265B5 X-Stat-Signature: s1ywqnghep1jnn1hgjfdjfj8a75y3hs7 X-HE-Tag: 1630620024-751998 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: From: Vasily Averin Subject: mm/mempolicy.c: use in_task() in mempolicy_slab_node() Obsoleted in_intrrupt() include task context with disabled BH, it's better to use in_task() instead. Link: https://lkml.kernel.org/r/984ee771-4834-21da-801f-c15c18ddf4d1@virtuozzo.com Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton --- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/mempolicy.c~mm-use-in_task-in-mempolicy_slab_node +++ a/mm/mempolicy.c @@ -1934,7 +1934,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;