Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp604860pxk; Wed, 16 Sep 2020 12:01:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6gvJWnA6+eqrRw+pRj1cP+zFd+wCAYQt4QJivLDd7XPekZpnWIvGpisy67vBR0HzH/WxR X-Received: by 2002:aa7:d6c6:: with SMTP id x6mr29435639edr.338.1600282882841; Wed, 16 Sep 2020 12:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600282882; cv=none; d=google.com; s=arc-20160816; b=RLO4GJrilaRewM6NfnpcySRngsM51Ix5OHPjrjScB3M6e+Fci1oQjWAYOiZreRBOIA 5cP7PgpdG6jWS673pohAB9eAGZsthMcNulzxkuXJAPlRc68Yv1Jt4AuMec8ne50UnCuD XNoNPXJQ4Gy4PnOx9rx+rGRjRzzl7kHWK2Gy5kxRNkJ+7pzV/64UoiPvKoybOWg2mGk1 vLC2HM5iMC4YrLr46rrbxDR4it56/t7AibIpxyBcwPTDCpHJGqC1PuXNpmmaC/BjSrQQ LGGJAOFD1CgVRCbmTw2bLfdBHobHnF5oXlFcxh0eJBMQ9dOCmyb3CnqKTRBzdKXKg1eS MHLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=8wwjell23c5WQc00jhxmoP0YBULrPQDl9G2pAbR26vE=; b=qUzRRnZioEii6M+e91hv1fWUbAZa2XyT67WXgrnAW/L5XRmKBrccARuHNr0VS555kX e+9gPKhs/1oX733vFEjqBfm44TdVMIp7uTnKgNmHF6ORpAWs1TeU3M6k2iZ6hr3ItLIf XtQYnvqZspX8ooue0nzWvSDgWam0eWexJChSjkrO3yguYUwoctoUmE32QiBObHsfclGx SEC3bpWpcuj+4kRgWj75VCNQGs5btfoV2CBa6t39aFs3q69hTgeGDhdRDMHW7VyZ+L14 SCb1QEvQfvhCeuVzFzw7mLpW/8xQm2LNX5GFIqlpH5yxIS8Z/D3hnq9fSGozAlhk3N7O FBDg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp1si13636809ejc.307.2020.09.16.12.01.00; Wed, 16 Sep 2020 12:01:22 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727200AbgIPTAW (ORCPT + 99 others); Wed, 16 Sep 2020 15:00:22 -0400 Received: from mail1.windriver.com ([147.11.146.13]:49178 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727666AbgIPTAL (ORCPT ); Wed, 16 Sep 2020 15:00:11 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.2) with ESMTPS id 08GBNieV017215 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 16 Sep 2020 04:23:45 -0700 (PDT) Received: from pek-lpggp1.wrs.com (128.224.153.74) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.487.0; Wed, 16 Sep 2020 04:23:44 -0700 From: To: , , CC: , Subject: [PATCH] cpuset: Move node_isset() outside of the rcu_read region Date: Wed, 16 Sep 2020 19:23:42 +0800 Message-ID: <20200916112342.25790-1-yanfei.xu@windriver.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yanfei Xu It's no need to keep node_isset still in rcu_read region, just move it outside of the rcu_read region. Signed-off-by: Yanfei Xu --- kernel/cgroup/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 642415b8c3c9..51d51ed97deb 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -3443,9 +3443,9 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask) rcu_read_lock(); cs = nearest_hardwall_ancestor(task_cs(current)); - allowed = node_isset(node, cs->mems_allowed); rcu_read_unlock(); + allowed = node_isset(node, cs->mems_allowed); spin_unlock_irqrestore(&callback_lock, flags); return allowed; } -- 2.18.2