aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-15 15:18:17 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-15 15:22:48 -0500
commit6700ec65c207068a81a535e9dca616fefac21671 (patch)
treee7acfee960655670d8ce0e336f656f9325e823f0
parent868a23a8043f2a3042dae60105c89bd4680187ba (diff)
lockdep: annotate reclaim context (__GFP_NOFS), fix
Impact: fix build warning Fix: mm/vmscan.c: In function ‘kswapd’: mm/vmscan.c:1969: warning: ISO C90 forbids mixed declarations and code node_to_cpumask_ptr(cpumask, pgdat->node_id), has a side-effect: it defines the 'cpumask' local variable as well, so it has to go into the variable definition section. Sidenote: it might make sense to make this purpose of these macros more apparent, by naming them the standard way, such as: DEFINE_node_to_cpumask_ptr(cpumask, pgdat->node_id); (But that is outside the scope of this patch.) Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mike Travis <travis@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--mm/vmscan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 303eb658b50b..cf8441345277 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1963,11 +1963,10 @@ static int kswapd(void *p)
1963 struct reclaim_state reclaim_state = { 1963 struct reclaim_state reclaim_state = {
1964 .reclaimed_slab = 0, 1964 .reclaimed_slab = 0,
1965 }; 1965 };
1966 node_to_cpumask_ptr(cpumask, pgdat->node_id);
1966 1967
1967 lockdep_set_current_reclaim_state(GFP_KERNEL); 1968 lockdep_set_current_reclaim_state(GFP_KERNEL);
1968 1969
1969 node_to_cpumask_ptr(cpumask, pgdat->node_id);
1970
1971 if (!cpumask_empty(cpumask)) 1970 if (!cpumask_empty(cpumask))
1972 set_cpus_allowed_ptr(tsk, cpumask); 1971 set_cpus_allowed_ptr(tsk, cpumask);
1973 current->reclaim_state = &reclaim_state; 1972 current->reclaim_state = &reclaim_state;