Skip to content

Commit 27ea65e

Browse files
qiangzh3chantra
authored andcommitted
rcu: Make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled
Currently, regardless of whether the CONFIG_RCU_LAZY is enabled, invoke the call_rcu() is always lazy, it also means that when CONFIG_RCU_LAZY is disabled, invoke the call_rcu_flush() is also lazy. therefore, this commit make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled. Signed-off-by: Zqiang <[email protected]> Acked-by: Joel Fernandes (Google) <[email protected]>
1 parent 87e7989 commit 27ea65e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2887,7 +2887,7 @@ EXPORT_SYMBOL_GPL(call_rcu_flush);
28872887
*/
28882888
void call_rcu(struct rcu_head *head, rcu_callback_t func)
28892889
{
2890-
return __call_rcu_common(head, func, true);
2890+
return __call_rcu_common(head, func, IS_ENABLED(CONFIG_RCU_LAZY));
28912891
}
28922892
EXPORT_SYMBOL_GPL(call_rcu);
28932893

0 commit comments

Comments
 (0)