Skip to content

Commit 8c7e22f

Browse files
Waiman-Longhtejun
authored andcommitted
cgroup/cpuset: Move cpu.h include to cpuset-internal.h
The newly created cpuset-v1.c file uses cpus_read_lock/unlock() functions which are defined in cpu.h but not included in cpuset-internal.h yet leading to compilation error under certain kernel configurations. Fix it by moving the cpu.h include from cpuset.c to cpuset-internal.h. While at it, sort the include files in alphabetic order. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 047b830 ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c") Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 3f9319c commit 8c7e22f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kernel/cgroup/cpuset-internal.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
#ifndef __CPUSET_INTERNAL_H
44
#define __CPUSET_INTERNAL_H
55

6-
#include <linux/union_find.h>
6+
#include <linux/cgroup.h>
7+
#include <linux/cpu.h>
78
#include <linux/cpumask.h>
8-
#include <linux/spinlock.h>
99
#include <linux/cpuset.h>
10-
#include <linux/cgroup.h>
10+
#include <linux/spinlock.h>
11+
#include <linux/union_find.h>
1112

1213
/* See "Frequency meter" comments, below. */
1314

kernel/cgroup/cpuset.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "cgroup-internal.h"
2525
#include "cpuset-internal.h"
2626

27-
#include <linux/cpu.h>
2827
#include <linux/init.h>
2928
#include <linux/interrupt.h>
3029
#include <linux/kernel.h>

0 commit comments

Comments
 (0)