]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: rcu: Introduce rcu_swap_protected()
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 29 Aug 2017 15:50:11 +0000 (08:50 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 30 Aug 2017 01:51:41 +0000 (21:51 -0400)
commit9a165ede73dd71f76398cd4472d36b6b5249f2d8
treefbdb1b52fa018e2dde35c9956aacfbd3636dfc1b
parentf953d0117795e36e124a1ecba73661542de2d02f
scsi: rcu: Introduce rcu_swap_protected()

A common pattern in RCU code is to assign a new value to an RCU pointer
after having read and stored the old value. Introduce a macro for this
pattern.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/linux/rcupdate.h