* linux-next: build failure after merge of the cgroup tree
@ 2022-08-29 3:29 Stephen Rothwell
2022-08-29 4:00 ` [PATCH] cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2022-08-29 3:29 UTC (permalink / raw)
To: Tejun Heo
Cc: Michal Koutný, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
Hi all,
After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:
mm/memcontrol.c: In function 'mem_cgroup_get_from_ino':
mm/memcontrol.c:5114:24: error: returning 'long int' from a function with return type 'struct mem_cgroup *' makes pointer from integer without a cast [-Werror=int-conversion]
5114 | return PTR_ERR(cgrp);
| ^~~~~~~~~~~~~
Caused by commit
fa7e439cf90b ("cgroup: Homogenize cgroup_get_from_id() return value")
I have used the cgroup tree from next-20220826 for today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG
2022-08-29 3:29 linux-next: build failure after merge of the cgroup tree Stephen Rothwell
@ 2022-08-29 4:00 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2022-08-29 4:00 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Michal Koutný,
Linux Kernel Mailing List, Linux Next Mailing List, cgroups
From c0f2df49cf2471289d5aabf16f50ac26eb268f7d Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Sun, 28 Aug 2022 17:54:15 -1000
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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")
---
Sorry about that. Applied this fix to cgroup/for-6.1.
Thanks.
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.37.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-29 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 3:29 linux-next: build failure after merge of the cgroup tree Stephen Rothwell
2022-08-29 4:00 ` [PATCH] cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®