]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu/kvfree: Refactor kvfree_rcu_queue_batch()
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Mon, 30 Sep 2024 11:37:10 +0000 (13:37 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 1 Oct 2024 16:30:42 +0000 (18:30 +0200)
commit3c5d61ae919cc377c71118ccc76fa6e8518023f8
treed06016519650830ae3d780f182fb3f8fbbbf4703
parent77ced98f0f03fdc196561d1afbe652899c318073
rcu/kvfree: Refactor kvfree_rcu_queue_batch()

Improve readability of kvfree_rcu_queue_batch() function
in away that, after a first batch queuing, the loop is break
and success value is returned to a caller.

There is no reason to loop and check batches further as all
outstanding objects have already been picked and attached to
a certain batch to complete an offloading.

Fixes: 2b55d6a42d14 ("rcu/kvfree: Add kvfree_rcu_barrier() API")
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/lkml/ZvWUt2oyXRsvJRNc@pc636/T/
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
kernel/rcu/tree.c