]> www.infradead.org Git - users/dwmw2/linux.git/commit
ratelimit: Use nolock_ret label to collapse lock-failure code
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 24 Apr 2025 19:16:21 +0000 (12:16 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 8 May 2025 23:13:27 +0000 (16:13 -0700)
commit743a1942d52f6827d39d8f6745d006b5bb8bbe6b
treecaa9b35d865eaf5262d870b7f1ee0507a89b6842
parenta69114c2a12c906957ddd3409af48f40e047ef53
ratelimit: Use nolock_ret label to collapse lock-failure code

Now that we have a nolock_ret label that handles ->missed correctly
based on the value of ret, we can eliminate a local variable and collapse
several "if" statements on the lock-acquisition-failure code path.

Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/
Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
lib/ratelimit.c