Merge branch 'for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[muen/linux.git] / fs / proc / base.c
index 33ed1746927a82ff4e39f57a65fb822561a9079c..af128b37414308025819ad8038507ad622ac3e94 100644 (file)
@@ -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);