Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

proc: save LOC in __xlate_proc_name()

Can't look at this verbosity anymore.

Link: https://lkml.kernel.org/r/YFYXAp/fgq405qcy@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
b793cd9a f4bf74d8

+2 -9
+2 -9
fs/proc/generic.c
··· 166 166 const char *cp = name, *next; 167 167 struct proc_dir_entry *de; 168 168 169 - de = *ret; 170 - if (!de) 171 - de = &proc_root; 172 - 173 - while (1) { 174 - next = strchr(cp, '/'); 175 - if (!next) 176 - break; 177 - 169 + de = *ret ?: &proc_root; 170 + while ((next = strchr(cp, '/')) != NULL) { 178 171 de = pde_subdir_find(de, cp, next - cp); 179 172 if (!de) { 180 173 WARN(1, "name '%s'\n", name);