[lkml]   [2022]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] init_task: Include <linux/rbtree.h> in the right file
There is no need to include <linux/rbtree.h> in init_task.h.
Move it to the right place, in kernel/cred.c which uses RB_ROOT_CACHED.

This is a follow-up of commit 4e7e3adbba52 ("Expand various INIT_* macros
and remove") which moved things from init_task.h to init_task.c

Signed-off-by: Christophe JAILLET <>
Let see if build-bots agree with me!

This patch depends on [1] and [2].
All these patches are related to init_task.h simplification.

They are unrelated and can be applied separately, but as they modify more
or less the same place in the same file, there may be some merge conflict.

include/linux/init_task.h | 1 -
init/init_task.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 6d2c4ea4c97a..e18a6c6f6fd9 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -9,7 +9,6 @@
#include <linux/ipc.h>
#include <linux/user_namespace.h>
#include <linux/seqlock.h>
-#include <linux/rbtree.h>
#include <linux/refcount.h>
#include <linux/sched/autogroup.h>
#include <net/net_namespace.h>
diff --git a/init/init_task.c b/init/init_task.c
index ff6c4b9bfe6b..2392c0a67fb7 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -2,6 +2,7 @@
#include <linux/init_task.h>
#include <linux/export.h>
#include <linux/mqueue.h>
+#include <linux/rbtree.h>
#include <linux/sched.h>
#include <linux/sched/sysctl.h>
#include <linux/sched/rt.h>
 \ /
  Last update: 2022-12-04 12:43    [W:0.054 / U:1.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site