migrate.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. struct list_head *moved, struct list_head *failed);
  11. extern int migrate_pages_to(struct list_head *pagelist,
  12. struct vm_area_struct *vma, int dest);
  13. extern int fail_migrate_page(struct address_space *,
  14. struct page *, struct page *);
  15. extern int migrate_prep(void);
  16. #else
  17. static inline int isolate_lru_page(struct page *p, struct list_head *list)
  18. { return -ENOSYS; }
  19. static inline int putback_lru_pages(struct list_head *l) { return 0; }
  20. static inline int migrate_pages(struct list_head *l, struct list_head *t,
  21. struct list_head *moved, struct list_head *failed) { return -ENOSYS; }
  22. static inline int migrate_pages_to(struct list_head *pagelist,
  23. struct vm_area_struct *vma, int dest) { return 0; }
  24. static inline int migrate_prep(void) { return -ENOSYS; }
  25. /* Possible settings for the migrate_page() method in address_operations */
  26. #define migrate_page NULL
  27. #define fail_migrate_page NULL
  28. #endif /* CONFIG_MIGRATION */
  29. #endif /* _LINUX_MIGRATE_H */