vm_area_operations: kill ->migrate()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 15 May 2014 09:06:42 +0000 (05:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Dec 2014 13:26:51 +0000 (08:26 -0500)
the only instance this method has ever grown was one in kernfs -
one that call ->migrate() of another vm_ops if it exists.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/kernfs/file.c
include/linux/migrate.h
include/linux/mm.h
mm/mempolicy.c
mm/migrate.c

index 697390e..ddc9f96 100644 (file)
@@ -448,27 +448,6 @@ static struct mempolicy *kernfs_vma_get_policy(struct vm_area_struct *vma,
        return pol;
 }
 
-static int kernfs_vma_migrate(struct vm_area_struct *vma,
-                             const nodemask_t *from, const nodemask_t *to,
-                             unsigned long flags)
-{
-       struct file *file = vma->vm_file;
-       struct kernfs_open_file *of = kernfs_of(file);
-       int ret;
-
-       if (!of->vm_ops)
-               return 0;
-
-       if (!kernfs_get_active(of->kn))
-               return 0;
-
-       ret = 0;
-       if (of->vm_ops->migrate)
-               ret = of->vm_ops->migrate(vma, from, to, flags);
-
-       kernfs_put_active(of->kn);
-       return ret;
-}
 #endif
 
 static const struct vm_operations_struct kernfs_vm_ops = {
@@ -479,7 +458,6 @@ static const struct vm_operations_struct kernfs_vm_ops = {
 #ifdef CONFIG_NUMA
        .set_policy     = kernfs_vma_set_policy,
        .get_policy     = kernfs_vma_get_policy,
-       .migrate        = kernfs_vma_migrate,
 #endif
 };
 
index 01aad3e..fab9b32 100644 (file)
@@ -36,9 +36,6 @@ extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
 
 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);
@@ -57,13 +54,6 @@ static inline int migrate_pages(struct list_head *l, new_page_t new,
 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) {}
 
Simple merge
diff --cc mm/mempolicy.c
Simple merge
diff --cc mm/migrate.c
Simple merge