linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/ksm: remove unused parameter from remove_trailing_rmap_items()
@ 2021-03-30  7:08 Chengyang Fan
  2021-03-30  9:27 ` David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: Chengyang Fan @ 2021-03-30  7:08 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel

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 <cy.fan@huawei.com>
---
 mm/ksm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/ksm.c b/mm/ksm.c
index 9694ee2c71de..dd69f030c8c0 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/ksm: remove unused parameter from remove_trailing_rmap_items()
  2021-03-30  7:08 [PATCH] mm/ksm: remove unused parameter from remove_trailing_rmap_items() Chengyang Fan
@ 2021-03-30  9:27 ` David Hildenbrand
  0 siblings, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-03-30  9:27 UTC (permalink / raw)
  To: Chengyang Fan, akpm; +Cc: linux-mm, linux-kernel

On 30.03.21 09:08, Chengyang Fan wrote:
> 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 <cy.fan@huawei.com>
> ---
>   mm/ksm.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/ksm.c b/mm/ksm.c
> index 9694ee2c71de..dd69f030c8c0 100644
> --- a/mm/ksm.c
> +++ b/mm/ksm.c
> @@ -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,
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] mm/ksm: remove unused parameter from remove_trailing_rmap_items()
@ 2021-03-30 12:13 Chengyang Fan
  0 siblings, 0 replies; 3+ messages in thread
From: Chengyang Fan @ 2021-03-30 12:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, cy.fan

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 <cy.fan@huawei.com>
---
 mm/ksm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/ksm.c b/mm/ksm.c
index 9694ee2c71de..dd69f030c8c0 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-30 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  7:08 [PATCH] mm/ksm: remove unused parameter from remove_trailing_rmap_items() Chengyang Fan
2021-03-30  9:27 ` David Hildenbrand
2021-03-30 12:13 Chengyang Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).