locking/static_keys: Rework update logic
authorPeter Zijlstra <[email protected]>
Fri, 24 Jul 2015 13:06:37 +0000 (15:06 +0200)
committerIngo Molnar <[email protected]>
Mon, 3 Aug 2015 09:34:15 +0000 (11:34 +0200)
commit706249c222f68471b6f8e9e8e9b77665c404b226
tree5e4520408570e2b0338e1f5043a289da3bef78af
parente33886b38cc82a9fc3b2d655dfc7f50467594138
locking/static_keys: Rework update logic

Instead of spreading the branch_default logic all over the place,
concentrate it into the one jump_label_type() function.

This does mean we need to actually increment/decrement the enabled
count _before_ calling the update path, otherwise jump_label_type()
will not see the right state.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/jump_label.c