mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>,
	Yury Norov <yury.norov@gmail.com>,
	"Dave Martin" <dave.martin@arm.com>, <fenghuay@nvidia.com>,
	<peternewman@google.com>, Babu Moger <Babu.Moger@amd.com>,
	Borislav Petkov <bp@alien8.de>,
	<shameerali.kolothum.thodi@huawei.com>,
	<bobo.shaobowang@huawei.com>,
	D Scott Phillips OS <scott@os.amperecomputing.com>,
	<carl@os.amperecomputing.com>, Koba Ko <kobak@nvidia.com>,
	Shanker Donthineni <sdonthineni@nvidia.com>,
	Xin Hao <xhao@linux.alibaba.com>, <baolin.wang@linux.alibaba.com>,
	<lcherian@marvell.com>, <amitsinght@marvell.com>,
	Ingo Molnar <mingo@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	H Peter Anvin <hpa@zytor.com>, Rex Nie <rex.nie@jaguarmicro.com>,
	Jamie Iles <quic_jiles@quicinc.com>, <dfustini@baylibre.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] fs/resctrl: Optimize code in rdt_get_tree()
Date: Fri, 13 Jun 2025 11:01:32 -0700	[thread overview]
Message-ID: <d24b79d3-9a15-4b64-91d0-dfddaa6f5e42@intel.com> (raw)
In-Reply-To: <20250613073733.3642679-2-tan.shaopeng@jp.fujitsu.com>

Hi Shaopeng,

On 6/13/25 12:37 AM, Shaopeng Tan wrote:
> 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 <tan.shaopeng@jp.fujitsu.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 1beb124e25f6..592d4f69fce9 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;
>  
>  	ret = schemata_list_create();
> -	if (ret) {
> -		schemata_list_destroy();
> -		goto out_ctx;
> -	}
> +	if (ret)
> +		goto out_schemata_free;
>  
>  	ret = closid_init();
>  	if (ret)
> @@ -2683,7 +2681,6 @@ static int rdt_get_tree(struct fs_context *fc)
>  	closid_exit();
>  out_schemata_free:
>  	schemata_list_destroy();
> -out_ctx:
>  	rdt_disable_ctx();
>  out_root:
>  	rdtgroup_destroy_root();

Could you please resubmit this independently? That is, not in an
email thread with the cpumask patch?

With that:
| Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Thank you very much.

Reinette


  parent reply	other threads:[~2025-06-13 18:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  7:37 [PATCH] cpumask: Remove unnecessary cpumask_nth_andnot() Shaopeng Tan
2025-06-13  7:37 ` [PATCH] fs/resctrl: Optimize code in rdt_get_tree() Shaopeng Tan
2025-06-13 16:57   ` James Morse
2025-06-13 18:01   ` Reinette Chatre [this message]
2025-06-21 14:40 ` [PATCH] cpumask: Remove unnecessary cpumask_nth_andnot() Yury Norov
2025-06-17  1:06 [PATCH] fs/resctrl: Optimize code in rdt_get_tree() Shaopeng Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d24b79d3-9a15-4b64-91d0-dfddaa6f5e42@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Babu.Moger@amd.com \
    --cc=amitsinght@marvell.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bobo.shaobowang@huawei.com \
    --cc=bp@alien8.de \
    --cc=carl@os.amperecomputing.com \
    --cc=dave.martin@arm.com \
    --cc=david@redhat.com \
    --cc=dfustini@baylibre.com \
    --cc=fenghuay@nvidia.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kobak@nvidia.com \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peternewman@google.com \
    --cc=quic_jiles@quicinc.com \
    --cc=rex.nie@jaguarmicro.com \
    --cc=scott@os.amperecomputing.com \
    --cc=sdonthineni@nvidia.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=tan.shaopeng@jp.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xhao@linux.alibaba.com \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®