]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rcu: Remove rcu_swap_protected()
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 23 Sep 2019 23:31:42 +0000 (16:31 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 12 Dec 2019 18:24:52 +0000 (10:24 -0800)
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 <torvalds@linux-foundation.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Shane M Seymour <shane.seymour@hpe.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
include/linux/rcupdate.h

index 0b7506330c87dc1df106c78ddb09b4dca9172864..fe470243acddfde127bf0a2ca1f3bf5536a4f006 100644 (file)
@@ -400,22 +400,6 @@ do {                                                                             \
        __tmp;                                                          \
 })
 
-/**
- * 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