Skip to content

Commit 43b08ea

Browse files
committed
cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2077665 commit c0f2df4 Author: Tejun Heo <tj@kernel.org> Date: Sun, 28 Aug 2022 17:54:15 -1000 cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG fa7e439 ("cgroup: Homogenize cgroup_get_from_id() return value") broken build when CONFIG_SHRINKER_DEBUG by trying to return an errno from mem_cgroup_get_from_ino() which returns struct mem_cgroup *. Fix by using ERR_CAST() instead. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Michal Koutný <mkoutny@suse.com>f Fixes: fa7e439 ("cgroup: Homogenize cgroup_get_from_id() return value") Signed-off-by: Waiman Long <longman@redhat.com>
1 parent 7398e7f commit 43b08ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memcontrol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5147,7 +5147,7 @@ struct mem_cgroup *mem_cgroup_get_from_ino(unsigned long ino)
51475147

51485148
cgrp = cgroup_get_from_id(ino);
51495149
if (IS_ERR(cgrp))
5150-
return PTR_ERR(cgrp);
5150+
return ERR_CAST(cgrp);
51515151

51525152
css = cgroup_get_e_css(cgrp, &memory_cgrp_subsys);
51535153
if (css)

0 commit comments

Comments
 (0)