diff options
| author | Thomas Gleixner <[email protected]> | 2021-09-10 22:38:47 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2021-09-10 22:38:47 +0000 |
| commit | c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4 (patch) | |
| tree | 533a2077028e02a851e51ad509a0aa3a9107999f /fs/proc/array.c | |
| parent | drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() (diff) | |
| parent | Merge tag 'acpi-5.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
| download | kernel-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.tar.gz kernel-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.zip | |
Merge branch 'linus' into smp/urgent
Ensure that all usage sites of get/put_online_cpus() except for the
struggler in drivers/thermal are gone. So the last user and the deprecated
inlines can be removed.
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index ee0ce8cecc4a..49be8c8ef555 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -98,27 +98,17 @@ void proc_task_name(struct seq_file *m, struct task_struct *p, bool escape) { - char *buf; - size_t size; char tcomm[64]; - int ret; if (p->flags & PF_WQ_WORKER) wq_worker_comm(tcomm, sizeof(tcomm), p); else __get_task_comm(tcomm, sizeof(tcomm), p); - size = seq_get_buf(m, &buf); - if (escape) { - ret = string_escape_str(tcomm, buf, size, - ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\"); - if (ret >= size) - ret = -1; - } else { - ret = strscpy(buf, tcomm, size); - } - - seq_commit(m, ret); + if (escape) + seq_escape_str(m, tcomm, ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\"); + else + seq_printf(m, "%.64s", tcomm); } /* |
