summary refs log tree commit diff
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-05 17:31:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-05 17:31:33 -0700
commitaf6c5d5e01ad9f2c9ca38cccaae6b5d67ddd241f (patch)
tree5bfdb1ee5c0b904732929eae55fe6da13bd273d5 /fs/proc/base.c
parent9f25a8da423226d7797e35a132535186c531228b (diff)
parent66448bc274cadedb71fda7d914e7c29d8dead217 (diff)
downloadlinux-af6c5d5e01ad9f2c9ca38cccaae6b5d67ddd241f.tar.gz
Merge branch 'for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue updates from Tejun Heo:

 - make kworkers report the workqueue it is executing or has executed
   most recently in /proc/PID/comm (so they show up in ps/top)

 - CONFIG_SMP shuffle to move stuff which isn't necessary for UP builds
   inside CONFIG_SMP.

* 'for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: move function definitions within CONFIG_SMP block
  workqueue: Make sure struct worker is accessible for wq_worker_comm()
  workqueue: Show the latest workqueue name in /proc/PID/{comm,stat,status}
  proc: Consolidate task->comm formatting into proc_task_name()
  workqueue: Set worker->desc to workqueue name by default
  workqueue: Make worker_attach/detach_pool() update worker->pool
  workqueue: Replace pool->attach_mutex with global wq_pool_attach_mutex
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 33ed1746927a..af128b374143 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1563,9 +1563,8 @@ static int comm_show(struct seq_file *m, void *v)
 	if (!p)
 		return -ESRCH;
 
-	task_lock(p);
-	seq_printf(m, "%s\n", p->comm);
-	task_unlock(p);
+	proc_task_name(m, p, false);
+	seq_putc(m, '\n');
 
 	put_task_struct(p);