lkml.org 
[lkml]   [2013]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kernel/rcutree.c: deem to be lazy if there are no callbacks.
According to the comment above rcu_cpu_has_callbacks(): "If there are
no callbacks, all of them are deemed to be lazy".

So when both 'hc' and 'al' are false, '*all_lazy' should be true, not
false.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
kernel/rcutree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5b53a89..9ee9565 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -2725,7 +2725,7 @@ static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy)
hc = true;
}
if (all_lazy)
- *all_lazy = al;
+ *all_lazy = !hc ? true : al;
return hc;
}

--
1.7.7.6

\
 
 \ /
  Last update: 2013-08-20 06:01    [W:0.061 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site