[PATCH 04/13] cgroup: export following two interfaces

From: Wang Jianchao
Date: Mon Jan 10 2022 - 04:14:48 EST


From: Wang Jianchao <wangjianchao@xxxxxxxxxxxx>

This is a preparation for making blk-rq-qos modular, there is no
functional change, but just export interfaces pr_cont_cgroup_path
and cgroup_parse_float.

Signed-off-by: Wang Jianchao <wangjianchao@xxxxxxxxxxxx>
---
include/linux/cgroup.h | 5 +----
kernel/cgroup/cgroup.c | 7 +++++++
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 75c151413fda..1a67b0db00db 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -666,10 +666,7 @@ static inline void pr_cont_cgroup_name(struct cgroup *cgrp)
pr_cont_kernfs_name(cgrp->kn);
}

-static inline void pr_cont_cgroup_path(struct cgroup *cgrp)
-{
- pr_cont_kernfs_path(cgrp->kn);
-}
+void pr_cont_cgroup_path(struct cgroup *cgrp);

static inline struct psi_group *cgroup_psi(struct cgroup *cgrp)
{
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 919194de39c8..f358d5122033 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -6597,6 +6597,13 @@ int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v)
*v = whole * power_of_ten(dec_shift) + frac;
return 0;
}
+EXPORT_SYMBOL_GPL(cgroup_parse_float);
+
+void pr_cont_cgroup_path(struct cgroup *cgrp)
+{
+ pr_cont_kernfs_path(cgrp->kn);
+}
+EXPORT_SYMBOL_GPL(pr_cont_cgroup_path);

/*
* sock->sk_cgrp_data handling. For more info, see sock_cgroup_data
--
2.17.1