]> err.no Git - linux-2.6/blobdiff - include/linux/migrate.h
Add unitialized_var() macro for suppressing gcc warnings
[linux-2.6] / include / linux / migrate.h
index 5dba23a1c0d0e0d75dc0bb465aaba2836bca5bcc..75e55dcdeb183bfc76c55fa8ffc05c930bbd49d1 100644 (file)
@@ -5,6 +5,14 @@
 
 typedef struct page *new_page_t(struct page *, unsigned long private, int **);
 
+/* Check if a vma is migratable */
+static inline int vma_migratable(struct vm_area_struct *vma)
+{
+       if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED))
+               return 0;
+       return 1;
+}
+
 #ifdef CONFIG_MIGRATION
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
 extern int putback_lru_pages(struct list_head *l);
@@ -16,7 +24,9 @@ extern int fail_migrate_page(struct address_space *,
                        struct page *, struct page *);
 
 extern int migrate_prep(void);
-
+extern int migrate_vmas(struct mm_struct *mm,
+               const nodemask_t *from, const nodemask_t *to,
+               unsigned long flags);
 #else
 
 static inline int isolate_lru_page(struct page *p, struct list_head *list)
@@ -30,6 +40,13 @@ static inline int migrate_pages_to(struct list_head *pagelist,
 
 static inline int migrate_prep(void) { return -ENOSYS; }
 
+static inline int migrate_vmas(struct mm_struct *mm,
+               const nodemask_t *from, const nodemask_t *to,
+               unsigned long flags)
+{
+       return -ENOSYS;
+}
+
 /* Possible settings for the migrate_page() method in address_operations */
 #define migrate_page NULL
 #define fail_migrate_page NULL