+ mm-remove-the-non-useful-else-after-a-break-in-a-if-statement.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: remove the non-useful else after a break in a if statement
has been added to the -mm mm-unstable branch.  Its filename is
     mm-remove-the-non-useful-else-after-a-break-in-a-if-statement.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-the-non-useful-else-after-a-break-in-a-if-statement.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Keren Sun <kerensun@xxxxxxxxxx>
Subject: mm: remove the non-useful else after a break in a if statement
Date: Fri, 15 Nov 2024 15:57:44 -0800

Remove the else block since there is already a break in the statement of
if (iter->oom_lock), just set iter->oom_lock true after the if block ends.

Link: https://lkml.kernel.org/r/20241115235744.1419580-4-kerensun@xxxxxxxxxx
Signed-off-by: Keren Sun <kerensun@xxxxxxxxxx>
Reviewed-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: Muchun Song <muchun.song@xxxxxxxxx>
Cc: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memcontrol-v1.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mm/memcontrol-v1.c~mm-remove-the-non-useful-else-after-a-break-in-a-if-statement
+++ a/mm/memcontrol-v1.c
@@ -1134,8 +1134,8 @@ static bool mem_cgroup_oom_trylock(struc
 			failed = iter;
 			mem_cgroup_iter_break(memcg, iter);
 			break;
-		} else
-			iter->oom_lock = true;
+		}
+		iter->oom_lock = true;
 	}
 
 	if (failed) {
_

Patches currently in -mm which might be from kerensun@xxxxxxxxxx are

mm-prefer-unsigned-int-to-bare-use-of-unsigned.patch
mm-remove-unnecessary-whitespace-before-a-quoted-newline.patch
mm-remove-the-non-useful-else-after-a-break-in-a-if-statement.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux