Skip to content

Commit

Permalink
vmstat: include compaction.h when CONFIG_COMPACTION
Browse files Browse the repository at this point in the history
This removes following warning from sparse:

 mm/vmstat.c:466:5: warning: symbol 'fragmentation_index' was not declared. Should it be static?

[akpm@linux-foundation.org: move the include to top-of-file]
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Namhyung Kim authored and Linus Torvalds committed Oct 26, 2010
1 parent 92c09c0 commit 36deb0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/sched.h>
#include <linux/math64.h>
#include <linux/writeback.h>
#include <linux/compaction.h>

#ifdef CONFIG_VM_EVENT_COUNTERS
DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
Expand Down Expand Up @@ -395,6 +396,7 @@ void zone_statistics(struct zone *preferred_zone, struct zone *z)
#endif

#ifdef CONFIG_COMPACTION

struct contig_page_info {
unsigned long free_pages;
unsigned long free_blocks_total;
Expand Down

0 comments on commit 36deb0b

Please sign in to comment.