Skip to contentSkip to conversation

mm/migrate.c: cleanups

PATCH In review Adrian Bunk 2 participants 2 messages Jul 5, 2007 – Jul 6, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/migrate.c: cleanups

This patch contains the following cleanups:
- every file should include the headers containing the prototypes for its global functions
- make the needlessly global putback_lru_pages() static

---

 include/linux/migrate.h |    2 --
 mm/migrate.c            |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)
include/linux/migrate.h renamed from include/linux/migrate.h.old +0 -2
@@ -26,7 +26,6 @@
 }
 
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
-extern int putback_lru_pages(struct list_head *l);
 extern int migrate_page(struct address_space *,
 			struct page *, struct page *);
 extern int migrate_pages(struct list_head *l, new_page_t x, unsigned long);
@@ -44,7 +43,6 @@
 
 static inline int isolate_lru_page(struct page *p, struct list_head *list)
 					{ return -ENOSYS; }
-static inline int putback_lru_pages(struct list_head *l) { return 0; }
 static inline int migrate_pages(struct list_head *l, new_page_t x,
 		unsigned long private) { return -ENOSYS; }
 
mm/migrate.c renamed from mm/migrate.c.old +2 -1
@@ -28,6 +28,7 @@
 #include <linux/mempolicy.h>
 #include <linux/vmalloc.h>
 #include <linux/security.h>
+#include <linux/syscalls.h>
 
 #include "internal.h"
 
@@ -101,7 +102,7 @@
  *
  * returns the number of pages put back.
  */
-int putback_lru_pages(struct list_head *l)
+static int putback_lru_pages(struct list_head *l)
 {
 	struct page *page;
 	struct page *page2;
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Adrian Bunk

This patch contains the following cleanups:
- every file should include the headers containing the prototypes for its global functions
- make the needlessly global putback_lru_pages() static

Well we may have to re-rexport putback_lru_pages() again soon because of the hotplug / memory compaction work but until that time.