diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-06-23 16:48:28 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-07-09 12:15:32 -0400 |
commit | 406e3e536550bcb87ccbedddcd483776b1828761 (patch) | |
tree | c7b9684ab8645692d7a5a2e88f7ed1c14ea46f17 | |
parent | 11992c703a1c7d95f5d8759498d7617d4a504819 (diff) |
rcu: Fix __rcu_reclaim() to use true/false for bool
The __rcu_reclaim() function returned 0/1, which is not proper for a
function of type bool. This commit therefore converts to false/true.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
-rw-r--r-- | kernel/rcu/rcu.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index bfda2726ca45..ff1a6de62f17 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h | |||
@@ -99,6 +99,10 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head) | |||
99 | 99 | ||
100 | void kfree(const void *); | 100 | void kfree(const void *); |
101 | 101 | ||
102 | /* | ||
103 | * Reclaim the specified callback, either by invoking it (non-lazy case) | ||
104 | * or freeing it directly (lazy case). Return true if lazy, false otherwise. | ||
105 | */ | ||
102 | static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head) | 106 | static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head) |
103 | { | 107 | { |
104 | unsigned long offset = (unsigned long)head->func; | 108 | unsigned long offset = (unsigned long)head->func; |
@@ -108,12 +112,12 @@ static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head) | |||
108 | RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset)); | 112 | RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset)); |
109 | kfree((void *)head - offset); | 113 | kfree((void *)head - offset); |
110 | rcu_lock_release(&rcu_callback_map); | 114 | rcu_lock_release(&rcu_callback_map); |
111 | return 1; | 115 | return true; |
112 | } else { | 116 | } else { |
113 | RCU_TRACE(trace_rcu_invoke_callback(rn, head)); | 117 | RCU_TRACE(trace_rcu_invoke_callback(rn, head)); |
114 | head->func(head); | 118 | head->func(head); |
115 | rcu_lock_release(&rcu_callback_map); | 119 | rcu_lock_release(&rcu_callback_map); |
116 | return 0; | 120 | return false; |
117 | } | 121 | } |
118 | } | 122 | } |
119 | 123 | ||