diff options
author | Tejun Heo <tj@kernel.org> | 2022-08-29 06:54:15 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-08-29 06:54:15 +0300 |
commit | c0f2df49cf2471289d5aabf16f50ac26eb268f7d (patch) | |
tree | 142d8ac5bf610ebf8381d0d0f81f65dd9bede4dc /mm/memcontrol.c | |
parent | 075b593f54f0f3883532cb750081cae6917bc8fe (diff) | |
download | linux-c0f2df49cf2471289d5aabf16f50ac26eb268f7d.tar.xz |
cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG
fa7e439cf90b ("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: fa7e439cf90b ("cgroup: Homogenize cgroup_get_from_id() return value")
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 86f5ca8c6fa6..e9fc364d5e96 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5111,7 +5111,7 @@ struct mem_cgroup *mem_cgroup_get_from_ino(unsigned long ino) cgrp = cgroup_get_from_id(ino); if (IS_ERR(cgrp)) - return PTR_ERR(cgrp); + return ERR_CAST(cgrp); css = cgroup_get_e_css(cgrp, &memory_cgrp_subsys); if (css) |