diff options
| author | Paul E. McKenney <[email protected]> | 2019-09-23 22:05:11 +0000 |
|---|---|---|
| committer | Paul E. McKenney <[email protected]> | 2019-10-30 15:43:08 +0000 |
| commit | a63fc6b75cca984c71f095282e0227a390ba88f3 (patch) | |
| tree | 3ef7fa0aeeba009a3994f424bb9ba5f7de65045f /lib/test_printf.c | |
| parent | Linux 5.4-rc1 (diff) | |
| download | kernel-a63fc6b75cca984c71f095282e0227a390ba88f3.tar.gz kernel-a63fc6b75cca984c71f095282e0227a390ba88f3.zip | |
rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
Although the rcu_swap_protected() macro follows the example of
swap(), the interactions with RCU make its update of its argument
somewhat counter-intuitive. This commit therefore introduces
an rcu_replace_pointer() that returns the old value of the RCU
pointer instead of doing the argument update. Once all the uses of
rcu_swap_protected() are updated to instead use rcu_replace_pointer(),
rcu_swap_protected() will be removed.
Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/
Reported-by: Linus Torvalds <[email protected]>
[ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ]
Signed-off-by: Paul E. McKenney <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Cc: Shane M Seymour <[email protected]>
Cc: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/test_printf.c')
0 files changed, 0 insertions, 0 deletions
