Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1499756pxm; Thu, 24 Feb 2022 04:31:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzofOV0RnC1A4/x6km7tC1gmIEMUvQmJsRnts7d8qy2Ww32QQAzuTBIY4Y8hYl2nCid7HkP X-Received: by 2002:a05:6402:11cc:b0:40f:b100:492a with SMTP id j12-20020a05640211cc00b0040fb100492amr2132526edw.282.1645705863540; Thu, 24 Feb 2022 04:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645705863; cv=none; d=google.com; s=arc-20160816; b=JGF9Cq5h7cyTHdRcc6RzokxZbYFQHdsAJt+XKxf+bGkC/z1xfcl5pjDBg0GVR1UGha 1Ammo/WUdDjtNWPmV+KX9svuoL/7klb6DrWCwH7BupPXy6s6YlolgIcW86nHfUWYP4Kj Q2c3QSAPgGyPgSLFhDHYffozqUPuqw2WlLCSaUNhSP+EKlX/8ZDk5ErcI51ZzdDFUCMK vaV0U1VscwYUYN8JGNEKREEjZSi5P7pMgzeedETPH+1IjKhGiQK4YFAn7ob3qt9OJmaA FMNIhANYybJhcVJymIjFhcDCg7p0RshMiPP81t6nNWOrq6Cg1ZJrzdmB/oK0BytESAjb 01kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7/Pf97c+qDXtgpm03b2g/c6CbIGAJVpmw//jw4FCLR8=; b=0erINBCHVHy4HVEHKLqQnOT+ab61p6gWpvWHTwZrw32kKHEZoJH40nI0FwJIItwDBa IxNxVLz+0kB0RhQVbsjzBOxfJEiASAUzTw7DLwsALXexBIeeSJ4e8qXGHUojMqsNT8J+ g06ftga/JXGdyV68Lv0IXeCtm5adL/do0/FARfK9H8KLxdR7Xo0wqSjIIQjXPNU/kE9R 8Vrg8YbP9nd6O3Rp3Y3Kw7LJwEktnLmZnucwfOfiz1mo65nNpSUuLjz/f1gYl83bhu6Y lADDai2AVr65LjawXSTLzWuL5o2NGQNGzsl4Mc2dY7KPuJtUY/9JeEwO5muH7X6snI38 kiAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5si1732154edd.190.2022.02.24.04.30.40; Thu, 24 Feb 2022 04:31:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbiBXMAu (ORCPT + 99 others); Thu, 24 Feb 2022 07:00:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231760AbiBXMAs (ORCPT ); Thu, 24 Feb 2022 07:00:48 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1234BB8A for ; Thu, 24 Feb 2022 04:00:19 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4K4BDx34Ltzbbpy; Thu, 24 Feb 2022 19:55:45 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 24 Feb 2022 20:00:17 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/oom_kill: remove unneeded is_memcg_oom check Date: Thu, 24 Feb 2022 19:59:33 +0800 Message-ID: <20220224115933.20154-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org oom_cpuset_eligible is always called when !is_memcg_oom. Remove this unnecessary check. Signed-off-by: Miaohe Lin --- mm/oom_kill.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 9fea6d3c1ec7..c70a4330e548 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -122,9 +122,6 @@ static bool oom_cpuset_eligible(struct task_struct *start, bool ret = false; const nodemask_t *mask = oc->nodemask; - if (is_memcg_oom(oc)) - return true; - rcu_read_lock(); for_each_thread(start, tsk) { if (mask) { -- 2.23.0