From nobody Thu Oct 2 15:35:02 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61DD53090C6; Mon, 15 Sep 2025 11:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757935682; cv=none; b=vBz3lMqfOioUOiw6Iteq3hij9lMW0ppWu74snHDys9F1LbEUqLQbn+DEvNiUsGNLgxPFnnY4tU9FX48xBuC1iAAD5/TPH5pnNcV58BLoS+T5pJsYpZUE//XlejLaxYIOv60EXH8rvzWN/ilw08QvphZMoA4D2ukJTE5/tmwfI/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757935682; c=relaxed/simple; bh=BKICxK6iSZQAD50Deux/ALrfLydfZiRfZcSRZK6xuyE=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=Glzl+sJ12bJMG+6JULs2b1V2WVHuFhOnhF2cJh/uf6essoPzluoMuEG3Hq1UAxRn3i77XZdq+7+XSNKnKQnSZWBfCOnNi0Y2S08miTDI3/S/fyxmwLH5eh4jlrKvyOaG0B6wf8hFvkOH9OoK3zPndqvxmyVRUZ/eFanvwHYylTQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LCwwJowU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eHzF2oX8; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LCwwJowU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eHzF2oX8" Date: Mon, 15 Sep 2025 11:27:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757935678; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzF/NgE3bHSNOtk39ogLdXRYxVq0XlRzzMEA53+BPCM=; b=LCwwJowUsddnMdnP3e0bXYUaYkXsIvaw+mHbokkeZU/qKlO5ZO/hRrSuEXiGXGKdqnuoYr FmdKsgIaG4tqAbtfk2gPqb4smPvQVMsAuouH3BzAtM0RScsi7acjD30mMJxpWMe6Farmit qQBFY1YXfU11jESvBCfFQ5CFtcwGIreF4fLvj+oceS0sITbN75PPw/3bDm/KbhsXu1ItV8 cVPMcYfjM5fV5SgBS+0I3S5rM+RwnDLR8uy1usXp3rA4cEILuzdt0HSToeE1LbHABr0DEV tuaQm+lMWFCzIT0YZr+pEzNhvbyUpb3inQDsdfCYArdNU1QWId0/+MIC7SJNDQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757935678; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzF/NgE3bHSNOtk39ogLdXRYxVq0XlRzzMEA53+BPCM=; b=eHzF2oX8ztfPbP5h9vHXmjGTg8qHd3cZP4aLm7lVYJh0hbhSJoySHAZeeWfSYW6+8IsU53 IW9RlRhtNg3H/PBA== From: "tip-bot2 for Shaopeng Tan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] fs/resctrl: Optimize code in rdt_get_tree() Cc: Shaopeng Tan , "Borislav Petkov (AMD)" , Reinette Chatre , James Morse , Koba Ko , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <175793567707.709179.3797022840301715360.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cache branch of tip: Commit-ID: 0e58f6a7dd689c73d67e6a2164b46d4618f2698a Gitweb: https://git.kernel.org/tip/0e58f6a7dd689c73d67e6a2164b46d461= 8f2698a Author: Shaopeng Tan AuthorDate: Mon, 23 Jun 2025 16:50:50 +09:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 15 Sep 2025 11:44:01 +02:00 fs/resctrl: Optimize code in rdt_get_tree() schemata_list_destroy() has to be called if schemata_list_create() fails. rdt_get_tree() calls schemata_list_destroy() in two different ways: directly if schemata_list_create() itself fails and on the exit path via the out_schemata_free goto label. Remove schemata_list_destroy() call on schemata_list_create() failure. Use existing out_schemata_free goto label instead. Signed-off-by: Shaopeng Tan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: James Morse Reviewed-by: Koba Ko Link: https://lore.kernel.org/20250623075051.3610592-1-tan.shaopeng@jp.fuji= tsu.com --- fs/resctrl/rdtgroup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 77d0822..5f0b7cf 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2608,10 +2608,8 @@ static int rdt_get_tree(struct fs_context *fc) goto out_root; =20 ret =3D schemata_list_create(); - if (ret) { - schemata_list_destroy(); - goto out_ctx; - } + if (ret) + goto out_schemata_free; =20 ret =3D closid_init(); if (ret) @@ -2683,7 +2681,6 @@ out_closid_exit: closid_exit(); out_schemata_free: schemata_list_destroy(); -out_ctx: rdt_disable_ctx(); out_root: rdtgroup_destroy_root();