The following commit has been merged into the core/rcu branch of tip: Commit-ID: 4414abf89158d734a83c99f6504f648417bd9550 Gitweb: https://git.kernel.org/tip/4414abf89158d734a83c99f6504f648417bd9550 Author: Paul E. McKenney <paulmck@xxxxxxxxxx> AuthorDate: Mon, 23 Sep 2019 16:31:42 -07:00 Committer: Paul E. McKenney <paulmck@xxxxxxxxxx> CommitterDate: Thu, 12 Dec 2019 10:24:52 -08:00 rcu: Remove rcu_swap_protected() Now that the calls to rcu_swap_protected() have been replaced by rcu_replace_pointer(), this commit removes rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@xxxxxxxxxxxxxx/ Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx> Cc: Bart Van Assche <bart.vanassche@xxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Hannes Reinecke <hare@xxxxxxx> Cc: Johannes Thumshirn <jthumshirn@xxxxxxx> Cc: Shane M Seymour <shane.seymour@xxxxxxx> Cc: Martin K. Petersen <martin.petersen@xxxxxxxxxx> --- include/linux/rcupdate.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 0b75063..fe47024 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -401,22 +401,6 @@ do { \ }) /** - * rcu_swap_protected() - swap an RCU and a regular pointer - * @rcu_ptr: RCU pointer - * @ptr: regular pointer - * @c: the conditions under which the dereference will take place - * - * Perform swap(@rcu_ptr, @ptr) where @rcu_ptr is an RCU-annotated pointer and - * @c is the argument that is passed to the rcu_dereference_protected() call - * used to read that pointer. - */ -#define rcu_swap_protected(rcu_ptr, ptr, c) do { \ - typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \ - rcu_assign_pointer((rcu_ptr), (ptr)); \ - (ptr) = __tmp; \ -} while (0) - -/** * rcu_access_pointer() - fetch RCU pointer with no dereferencing * @p: The pointer to read *
![]() |