Commit 420be4ed authored by Chengyang Fan's avatar Chengyang Fan Committed by Linus Torvalds

mm/ksm: remove unused parameter from remove_trailing_rmap_items()

Since commit 6514d511 ("ksm: singly-linked rmap_list") was merged,
remove_trailing_rmap_items() doesn't use the 'mm_slot' parameter.  So
remove it, and update caller accordingly.

Link: https://lkml.kernel.org/r/20210330121320.1693474-1-cy.fan@huawei.comSigned-off-by: default avatarChengyang Fan <cy.fan@huawei.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c89a384e
...@@ -815,8 +815,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item) ...@@ -815,8 +815,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item)
cond_resched(); /* we're called from many long loops */ cond_resched(); /* we're called from many long loops */
} }
static void remove_trailing_rmap_items(struct mm_slot *mm_slot, static void remove_trailing_rmap_items(struct rmap_item **rmap_list)
struct rmap_item **rmap_list)
{ {
while (*rmap_list) { while (*rmap_list) {
struct rmap_item *rmap_item = *rmap_list; struct rmap_item *rmap_item = *rmap_list;
...@@ -987,7 +986,7 @@ static int unmerge_and_remove_all_rmap_items(void) ...@@ -987,7 +986,7 @@ static int unmerge_and_remove_all_rmap_items(void)
goto error; goto error;
} }
remove_trailing_rmap_items(mm_slot, &mm_slot->rmap_list); remove_trailing_rmap_items(&mm_slot->rmap_list);
mmap_read_unlock(mm); mmap_read_unlock(mm);
spin_lock(&ksm_mmlist_lock); spin_lock(&ksm_mmlist_lock);
...@@ -2333,7 +2332,7 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page) ...@@ -2333,7 +2332,7 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
* Nuke all the rmap_items that are above this current rmap: * Nuke all the rmap_items that are above this current rmap:
* because there were no VM_MERGEABLE vmas with such addresses. * because there were no VM_MERGEABLE vmas with such addresses.
*/ */
remove_trailing_rmap_items(slot, ksm_scan.rmap_list); remove_trailing_rmap_items(ksm_scan.rmap_list);
spin_lock(&ksm_mmlist_lock); spin_lock(&ksm_mmlist_lock);
ksm_scan.mm_slot = list_entry(slot->mm_list.next, ksm_scan.mm_slot = list_entry(slot->mm_list.next,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment