diff options
author | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
commit | 97327692361306d1e6259021bc425e32832fdb50 (patch) | |
tree | fe9088f3248ec61e24f404f21b9793cb644b7f01 /include/linux/migrate.h | |
parent | 2d05a8f663478a44e088d122e0d62109bbc801d0 (diff) | |
parent | a3a8b90b61e21be3dde9101c4e86c881e0f06210 (diff) | |
download | FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.gz FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.bz2 FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.zip |
dirty fix to merging
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r-- | include/linux/migrate.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h new file mode 100644 index 00000000..855c337b --- /dev/null +++ b/include/linux/migrate.h @@ -0,0 +1,67 @@ +#ifndef _LINUX_MIGRATE_H +#define _LINUX_MIGRATE_H + +#include <linux/mm.h> +#include <linux/mempolicy.h> +#include <linux/migrate_mode.h> + +typedef struct page *new_page_t(struct page *, unsigned long private, int **); + +#ifdef CONFIG_MIGRATION + +extern void putback_lru_pages(struct list_head *l); +extern int migrate_page(struct address_space *, + struct page *, struct page *, enum migrate_mode); +extern int migrate_pages(struct list_head *l, new_page_t x, + unsigned long private, bool offlining, + enum migrate_mode mode); +extern int migrate_huge_pages(struct list_head *l, new_page_t x, + unsigned long private, bool offlining, + enum migrate_mode mode); + +extern int fail_migrate_page(struct address_space *, + struct page *, struct page *); + +extern int migrate_prep(void); +extern int migrate_prep_local(void); +extern int migrate_vmas(struct mm_struct *mm, + const nodemask_t *from, const nodemask_t *to, + unsigned long flags); +extern void migrate_page_copy(struct page *newpage, struct page *page); +extern int migrate_huge_page_move_mapping(struct address_space *mapping, + struct page *newpage, struct page *page); +#else + +static inline void putback_lru_pages(struct list_head *l) {} +static inline int migrate_pages(struct list_head *l, new_page_t x, + unsigned long private, bool offlining, + enum migrate_mode mode) { return -ENOSYS; } +static inline int migrate_huge_pages(struct list_head *l, new_page_t x, + unsigned long private, bool offlining, + enum migrate_mode mode) { return -ENOSYS; } + +static inline int migrate_prep(void) { return -ENOSYS; } +static inline int migrate_prep_local(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; +} + +static inline void migrate_page_copy(struct page *newpage, + struct page *page) {} + +static inline int migrate_huge_page_move_mapping(struct address_space *mapping, + struct page *newpage, struct page *page) +{ + return -ENOSYS; +} + +/* Possible settings for the migrate_page() method in address_operations */ +#define migrate_page NULL +#define fail_migrate_page NULL + +#endif /* CONFIG_MIGRATION */ +#endif /* _LINUX_MIGRATE_H */ |