Skip to content

Commit

Permalink
mm-kmem-scoped-objcg-protection-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: else is not generally useful after a break or return
torvalds#73: FILE: mm/memcontrol.c:3135:
+		return objcg;
+	} else {

total: 0 errors, 1 warnings, 111 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-kmem-scoped-objcg-protection.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: David Rientjes <rientjes@google.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin (Cruise) <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 committed Oct 6, 2023
1 parent ac0a155 commit fb29dbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -3132,11 +3132,11 @@ __always_inline struct obj_cgroup *current_obj_cgroup(void)
* to use the objcg by the current task.
*/
return objcg;
} else {
memcg = this_cpu_read(int_active_memcg);
if (unlikely(memcg))
goto from_memcg;
}

memcg = this_cpu_read(int_active_memcg);
if (unlikely(memcg))
goto from_memcg;
return NULL;

from_memcg:
Expand Down

0 comments on commit fb29dbc

Please sign in to comment.