From: Joel Fernandes <joel@joelfernandes.org>
To: paulmck@kernel.org
Cc: linux-kernel@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"open list:SLEEPABLE READ-COPY UPDATE (SRCU)"
<rcu@vger.kernel.org>
Subject: Re: [PATCH 2/5] srcu: Fix error handling in init_srcu_struct_fields()
Date: Wed, 26 Jul 2023 23:04:04 -0400 [thread overview]
Message-ID: <d7d0f4c2-dd88-4ad2-8405-3c9b5d8cbb39@joelfernandes.org> (raw)
In-Reply-To: <1943e34c-3c8e-411c-a677-33f8c5b4b0e5@paulmck-laptop>
On 7/26/23 17:07, Paul E. McKenney wrote:
>> - free_percpu(ssp->sda);
>> - ssp->sda = NULL;
>> - kfree(ssp->srcu_sup);
>> - return -ENOMEM;
>> - }
>> - } else {
>> + if (!init_srcu_struct_nodes(ssp, GFP_ATOMIC))
>> + goto err_free_sda;
>> + else
>> WRITE_ONCE(ssp->srcu_sup->srcu_size_state, SRCU_SIZE_BIG);
> Given that the "then" clause is a goto, what is the "else" clause doing
> for us?
>
Not much. Agreed we can get rid of "else" and reduce indent of the
WRITE_ONCE that follows.
Would you mind making this fixup in the patch for your apply, or would
you like me to refresh the patch? Let me know either way, thank you!
- Joel
next prev parent reply other threads:[~2023-07-27 3:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 23:29 [PATCH 0/5] misc RCU fixes and cleanups Joel Fernandes (Google)
2023-07-25 23:29 ` [PATCH 1/5] rcutorture: Fix stuttering races and other issues Joel Fernandes (Google)
2023-07-26 20:59 ` Paul E. McKenney
2023-07-27 3:01 ` Joel Fernandes
2023-07-27 4:01 ` Paul E. McKenney
2023-07-27 4:03 ` Joel Fernandes
2023-07-25 23:29 ` [PATCH 2/5] srcu: Fix error handling in init_srcu_struct_fields() Joel Fernandes (Google)
2023-07-26 21:07 ` Paul E. McKenney
2023-07-27 3:04 ` Joel Fernandes [this message]
2023-07-27 4:02 ` Paul E. McKenney
2023-07-27 4:24 ` Joel Fernandes
2023-07-25 23:29 ` [PATCH 3/5] tree/nocb: Adjust RCU_NOCB_WAKE_* macros from weaker to stronger Joel Fernandes (Google)
2023-07-25 23:29 ` [PATCH 4/5] tree/nocb: Improve readability of nocb_gp_wait() Joel Fernandes (Google)
2023-07-25 23:29 ` [PATCH 5/5] Revert "checkpatch: Error out if deprecated RCU API used" Joel Fernandes (Google)
2023-07-26 21:12 ` Paul E. McKenney
2023-07-27 2:55 ` Joel Fernandes
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=d7d0f4c2-dd88-4ad2-8405-3c9b5d8cbb39@joelfernandes.org \
--to=joel@joelfernandes.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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®