Skip to content

Commit ad6c08d

Browse files
Dr. David Alan Gilberthtejun
authored andcommitted
cgroup/misc: Remove unused misc_cg_res_total_usage
misc_cg_res_total_usage() was added in 2021 by commit a72232e ("cgroup: Add misc cgroup controller") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Michal Koutný <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent dae68fb commit ad6c08d

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

include/linux/misc_cgroup.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ struct misc_cg {
6060
struct misc_res res[MISC_CG_RES_TYPES];
6161
};
6262

63-
u64 misc_cg_res_total_usage(enum misc_res_type type);
6463
int misc_cg_set_capacity(enum misc_res_type type, u64 capacity);
6564
int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount);
6665
void misc_cg_uncharge(enum misc_res_type type, struct misc_cg *cg, u64 amount);
@@ -104,11 +103,6 @@ static inline void put_misc_cg(struct misc_cg *cg)
104103

105104
#else /* !CONFIG_CGROUP_MISC */
106105

107-
static inline u64 misc_cg_res_total_usage(enum misc_res_type type)
108-
{
109-
return 0;
110-
}
111-
112106
static inline int misc_cg_set_capacity(enum misc_res_type type, u64 capacity)
113107
{
114108
return 0;

kernel/cgroup/misc.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,6 @@ static inline bool valid_type(enum misc_res_type type)
6767
return type >= 0 && type < MISC_CG_RES_TYPES;
6868
}
6969

70-
/**
71-
* misc_cg_res_total_usage() - Get the current total usage of the resource.
72-
* @type: misc res type.
73-
*
74-
* Context: Any context.
75-
* Return: Current total usage of the resource.
76-
*/
77-
u64 misc_cg_res_total_usage(enum misc_res_type type)
78-
{
79-
if (valid_type(type))
80-
return atomic64_read(&root_cg.res[type].usage);
81-
82-
return 0;
83-
}
84-
EXPORT_SYMBOL_GPL(misc_cg_res_total_usage);
85-
8670
/**
8771
* misc_cg_set_capacity() - Set the capacity of the misc cgroup res.
8872
* @type: Type of the misc res.

0 commit comments

Comments
 (0)