migrate.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _LINUX_MIGRATE_H
  2. #define _LINUX_MIGRATE_H
  3. #include <linux/mm.h>
  4. #ifdef CONFIG_MIGRATION
  5. extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
  6. extern int putback_lru_pages(struct list_head *l);
  7. extern int migrate_page(struct address_space *,
  8. struct page *, struct page *);
  9. extern int migrate_pages(struct list_head *l, struct list_head *t);
  10. extern int migrate_pages_to(struct list_head *pagelist,
  11. struct vm_area_struct *vma, int dest);
  12. extern int fail_migrate_page(struct address_space *,
  13. struct page *, struct page *);
  14. extern int migrate_prep(void);
  15. #else
  16. static inline int isolate_lru_page(struct page *p, struct list_head *list)
  17. { return -ENOSYS; }
  18. static inline int putback_lru_pages(struct list_head *l) { return 0; }
  19. static inline int migrate_pages(struct list_head *l, struct list_head *t)
  20. { return -ENOSYS; }
  21. static inline int migrate_pages_to(struct list_head *pagelist,
  22. struct vm_area_struct *vma, int dest) { return 0; }
  23. static inline int migrate_prep(void) { return -ENOSYS; }
  24. /* Possible settings for the migrate_page() method in address_operations */
  25. #define migrate_page NULL
  26. #define fail_migrate_page NULL
  27. #endif /* CONFIG_MIGRATION */
  28. #endif /* _LINUX_MIGRATE_H */