[5/5] mm/compaction: remove unnecessary "else continue" at end of loop in isolate_freepages_block

Message ID 20230729174354.2239980-6-shikemeng@huaweicloud.com
State New
Headers
Series Fixes and cleanups to compaction |

Commit Message

Kemeng Shi July 29, 2023, 5:43 p.m. UTC
  There is no behavior change to remove "else continue" code at end of scan loop.
Just remove it to make code cleaner.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 mm/compaction.c | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Baolin Wang Aug. 2, 2023, 3 a.m. UTC | #1
On 7/30/2023 1:43 AM, Kemeng Shi wrote:
> There is no behavior change to remove "else continue" code at end of scan loop.
> Just remove it to make code cleaner.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   mm/compaction.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index cfb661f4ce23..d38297018077 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -670,9 +670,6 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
>   isolate_fail:
>   		if (strict)
>   			break;
> -		else
> -			continue;
> -
>   	}
>   
>   	compact_unlock_irqrestore(&locked, flags);
  

Patch

diff --git a/mm/compaction.c b/mm/compaction.c
index cfb661f4ce23..d38297018077 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -670,9 +670,6 @@  static unsigned long isolate_freepages_block(struct compact_control *cc,
 isolate_fail:
 		if (strict)
 			break;
-		else
-			continue;
-
 	}
 
 	compact_unlock_irqrestore(&locked, flags);