]> asedeno.scripts.mit.edu Git - linux.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)
commit26e3e3cb05604073f2e9969fb0f06f35eb3b3313
treefbdb1b52fa018e2dde35c9956aacfbd3636dfc1b
parentfbf252335f8e2bd39d4ce59b1db0836a40ab227b
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