diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-15 05:06:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-17 08:26:51 -0500 |
commit | 50062175ffc844b8ff9664024c6416a37ad63c77 (patch) | |
tree | acde5ad578854a34a31a97eea496cfd5e6e155ef /mm | |
parent | 777eda2c5b84d6f3543f4aecbf4cd1f29b222a81 (diff) |
vm_area_operations: kill ->migrate()
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mempolicy.c | 5 | ||||
-rw-r--r-- | mm/migrate.c | 21 |
2 files changed, 0 insertions, 26 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index e58725aff7e9..c1b273f1837b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1047,10 +1047,6 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, | |||
1047 | 1047 | ||
1048 | down_read(&mm->mmap_sem); | 1048 | down_read(&mm->mmap_sem); |
1049 | 1049 | ||
1050 | err = migrate_vmas(mm, from, to, flags); | ||
1051 | if (err) | ||
1052 | goto out; | ||
1053 | |||
1054 | /* | 1050 | /* |
1055 | * Find a 'source' bit set in 'tmp' whose corresponding 'dest' | 1051 | * Find a 'source' bit set in 'tmp' whose corresponding 'dest' |
1056 | * bit in 'to' is not also set in 'tmp'. Clear the found 'source' | 1052 | * bit in 'to' is not also set in 'tmp'. Clear the found 'source' |
@@ -1130,7 +1126,6 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, | |||
1130 | if (err < 0) | 1126 | if (err < 0) |
1131 | break; | 1127 | break; |
1132 | } | 1128 | } |
1133 | out: | ||
1134 | up_read(&mm->mmap_sem); | 1129 | up_read(&mm->mmap_sem); |
1135 | if (err < 0) | 1130 | if (err < 0) |
1136 | return err; | 1131 | return err; |
diff --git a/mm/migrate.c b/mm/migrate.c index b1d02127e1be..344cdf692fc8 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1536,27 +1536,6 @@ out: | |||
1536 | return err; | 1536 | return err; |
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | /* | ||
1540 | * Call migration functions in the vma_ops that may prepare | ||
1541 | * memory in a vm for migration. migration functions may perform | ||
1542 | * the migration for vmas that do not have an underlying page struct. | ||
1543 | */ | ||
1544 | int migrate_vmas(struct mm_struct *mm, const nodemask_t *to, | ||
1545 | const nodemask_t *from, unsigned long flags) | ||
1546 | { | ||
1547 | struct vm_area_struct *vma; | ||
1548 | int err = 0; | ||
1549 | |||
1550 | for (vma = mm->mmap; vma && !err; vma = vma->vm_next) { | ||
1551 | if (vma->vm_ops && vma->vm_ops->migrate) { | ||
1552 | err = vma->vm_ops->migrate(vma, to, from, flags); | ||
1553 | if (err) | ||
1554 | break; | ||
1555 | } | ||
1556 | } | ||
1557 | return err; | ||
1558 | } | ||
1559 | |||
1560 | #ifdef CONFIG_NUMA_BALANCING | 1539 | #ifdef CONFIG_NUMA_BALANCING |
1561 | /* | 1540 | /* |
1562 | * Returns true if this is a safe migration target node for misplaced NUMA | 1541 | * Returns true if this is a safe migration target node for misplaced NUMA |