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 <[email protected]>
Cc: Dennis Zhou <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Roman Gushchin (Cruise) <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
akpm00 committed Sep 29, 2023
1 parent 175265f commit 54f47e4
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 54f47e4

Please sign in to comment.