Skip to content

Commit 4414abf

Browse files
committed
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@mail.gmail.com/ Reported-by: Linus Torvalds <[email protected]> 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]>
1 parent a191c9e commit 4414abf

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

include/linux/rcupdate.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -400,22 +400,6 @@ do { \
400400
__tmp; \
401401
})
402402

403-
/**
404-
* rcu_swap_protected() - swap an RCU and a regular pointer
405-
* @rcu_ptr: RCU pointer
406-
* @ptr: regular pointer
407-
* @c: the conditions under which the dereference will take place
408-
*
409-
* Perform swap(@rcu_ptr, @ptr) where @rcu_ptr is an RCU-annotated pointer and
410-
* @c is the argument that is passed to the rcu_dereference_protected() call
411-
* used to read that pointer.
412-
*/
413-
#define rcu_swap_protected(rcu_ptr, ptr, c) do { \
414-
typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \
415-
rcu_assign_pointer((rcu_ptr), (ptr)); \
416-
(ptr) = __tmp; \
417-
} while (0)
418-
419403
/**
420404
* rcu_access_pointer() - fetch RCU pointer with no dereferencing
421405
* @p: The pointer to read

0 commit comments

Comments
 (0)