From 88b72b31e15f9dfed069ede5416bb71040e0d299 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 18 May 2018 08:47:13 -0700 Subject: proc: Consolidate task->comm formatting into proc_task_name() proc shows task->comm in three places - comm, stat, status - and each is fetching and formatting task->comm slighly differently. This patch renames task_name() to proc_task_name(), makes it more generic, and updates all three paths to use it. This will enable expanding comm reporting for workqueue workers. Signed-off-by: Tejun Heo --- fs/proc/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/proc/internal.h') diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 0f1692e63cb6..b823fac621d2 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -131,6 +131,8 @@ unsigned name_to_int(const struct qstr *qstr); */ extern const struct file_operations proc_tid_children_operations; +extern void proc_task_name(struct seq_file *m, struct task_struct *p, + bool escape); extern int proc_tid_stat(struct seq_file *, struct pid_namespace *, struct pid *, struct task_struct *); extern int proc_tgid_stat(struct seq_file *, struct pid_namespace *, -- cgit v1.2.1