mm/migrate: remove unused mm argument from do_move_pages_to_node
authorGregory Price <gourry.memverge@gmail.com>
Tue, 3 Oct 2023 14:48:57 +0000 (10:48 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 18 Oct 2023 21:34:14 +0000 (14:34 -0700)
This function does not actively use the mm_struct, it can be removed.

Link: https://lkml.kernel.org/r/20231003144857.752952-2-gregory.price@memverge.com
Signed-off-by: Gregory Price <gregory.price@memverge.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Gregory Price <gregory.price@memverge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate.c

index 482f478ea3fe276b34f13c9f8e90be44cad77f30..9d9eee5322d191cca116073adf6a3c47f00a1ca1 100644 (file)
@@ -2029,8 +2029,7 @@ static int store_status(int __user *status, int start, int value, int nr)
        return 0;
 }
 
-static int do_move_pages_to_node(struct mm_struct *mm,
-               struct list_head *pagelist, int node)
+static int do_move_pages_to_node(struct list_head *pagelist, int node)
 {
        int err;
        struct migration_target_control mtc = {
@@ -2119,7 +2118,7 @@ out:
        return err;
 }
 
-static int move_pages_and_store_status(struct mm_struct *mm, int node,
+static int move_pages_and_store_status(int node,
                struct list_head *pagelist, int __user *status,
                int start, int i, unsigned long nr_pages)
 {
@@ -2128,7 +2127,7 @@ static int move_pages_and_store_status(struct mm_struct *mm, int node,
        if (list_empty(pagelist))
                return 0;
 
-       err = do_move_pages_to_node(mm, pagelist, node);
+       err = do_move_pages_to_node(pagelist, node);
        if (err) {
                /*
                 * Positive err means the number of failed
@@ -2196,7 +2195,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
                        current_node = node;
                        start = i;
                } else if (node != current_node) {
-                       err = move_pages_and_store_status(mm, current_node,
+                       err = move_pages_and_store_status(current_node,
                                        &pagelist, status, start, i, nr_pages);
                        if (err)
                                goto out;
@@ -2231,7 +2230,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
                if (err)
                        goto out_flush;
 
-               err = move_pages_and_store_status(mm, current_node, &pagelist,
+               err = move_pages_and_store_status(current_node, &pagelist,
                                status, start, i, nr_pages);
                if (err) {
                        /* We have accounted for page i */
@@ -2243,7 +2242,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
        }
 out_flush:
        /* Make sure we do not overwrite the existing error */
-       err1 = move_pages_and_store_status(mm, current_node, &pagelist,
+       err1 = move_pages_and_store_status(current_node, &pagelist,
                                status, start, i, nr_pages);
        if (err >= 0)
                err = err1;