mm/ksm: remove unused parameter from remove_trailing_rmap_items()
PATCH 1/1 mm/ksm: remove unused parameter from remove_trailing_rmap_items()
Since commit 6514d511dbe5 ("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.
Signed-off-by Chengyang Fan <[email protected]>
--- mm/ksm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
mm/ksm.c +3 -4
@@ -817,8 +817,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item)cond_resched ();/* we're called from many long loops */ } -static void remove_trailing_rmap_items (struct mm_slot *mm_slot, -struct rmap_item **rmap_list) +static void remove_trailing_rmap_items (struct rmap_item **rmap_list) {while (*rmap_list) {struct rmap_item *rmap_item = *rmap_list;
@@ -989,7 +988,7 @@ static int unmerge_and_remove_all_rmap_items(void) goto error; } -remove_trailing_rmap_items (mm_slot, &mm_slot->rmap_list); +remove_trailing_rmap_items (&mm_slot->rmap_list);mmap_read_unlock (mm);spin_lock (&ksm_mmlist_lock);
@@ -2337,7 +2336,7 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)* Nuke all the rmap_items that are above this current rmap: * 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); ksm_scan.mm_slot = list_entry(slot->mm_list.next,
Signature · 1 line
2.25.1
Quoted 34 lines · Chengyang Fan
Since commit
6514d511dbe5("ksm: singly-linkedrmap_list") was merged,remove_trailing_rmap_items()doesn't use the 'mm_slot' parameter. So remove it, and update caller accordingly.Signed-off-by Chengyang Fan <[email protected]>--- mm/ksm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)mm/ksm.c +2
-3@@ -817,8 +817,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item)cond_resched ();/* we're called from many long loops */ } -static void remove_trailing_rmap_items (struct mm_slot *mm_slot, -struct rmap_item **rmap_list) +static void remove_trailing_rmap_items (struct rmap_item **rmap_list) {while (*rmap_list) {struct rmap_item *rmap_item = *rmap_list;@@ -989,7 +988,7 @@ static int unmerge_and_remove_all_rmap_items(void) goto error; } -remove_trailing_rmap_items (mm_slot, &mm_slot->rmap_list); +remove_trailing_rmap_items (&mm_slot->rmap_list);mmap_read_unlock (mm);spin_lock (&ksm_mmlist_lock);
mm/ksm.c static struct rmap_item *scan_get_next_rmap_item(struct page **page) · line 2342
Quoted 8 lines
mm/ksm.c +1
-1@@ -2337,7 +2336,7 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)* Nuke all the rmap_items that are above this current rmap: * 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); ksm_scan.mm_slot = list_entry(slot->mm_list.next,
Reviewed-by David Hildenbrand <[email protected]>
Signature · 3 lines
Thanks, David / dhildenb