Skip to content

Commit

Permalink
key: Remove extraneous parentheses from rcu_assign_keypointer()
Browse files Browse the repository at this point in the history
This commit removes the extraneous parentheses from rcu_assign_keypointer()
so that rcu_assign_pointer() can be wrapped in do-while.  It also wraps
rcu_assign_keypointer() in a do-while and parenthesizes its final argument,
as suggested by David Howells.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
Paul E. McKenney committed Jul 2, 2012
1 parent d1b88eb commit e5c1f44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ static inline bool key_is_instantiated(const struct key *key)
rwsem_is_locked(&((struct key *)(KEY))->sem)))

#define rcu_assign_keypointer(KEY, PAYLOAD) \
(rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD))
do { \
rcu_assign_pointer((KEY)->payload.rcudata, (PAYLOAD)); \
} while (0)

#ifdef CONFIG_SYSCTL
extern ctl_table key_sysctls[];
Expand Down

0 comments on commit e5c1f44

Please sign in to comment.