projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4bf74d
)
proc: save LOC in __xlate_proc_name()
author
Alexey Dobriyan
<adobriyan@gmail.com>
Fri, 7 May 2021 01:02:13 +0000
(18:02 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 7 May 2021 02:24:11 +0000
(19:24 -0700)
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>
fs/proc/generic.c
patch
|
blob
|
history
diff --git
a/fs/proc/generic.c
b/fs/proc/generic.c
index
5600da3
..
5b78739
100644
(file)
--- a/
fs/proc/generic.c
+++ b/
fs/proc/generic.c
@@
-166,15
+166,8
@@
static int __xlate_proc_name(const char *name, struct proc_dir_entry **ret,
const char *cp = name, *next;
struct proc_dir_entry *de;
- de = *ret;
- if (!de)
- de = &proc_root;
-
- while (1) {
- next = strchr(cp, '/');
- if (!next)
- break;
-
+ de = *ret ?: &proc_root;
+ while ((next = strchr(cp, '/')) != NULL) {
de = pde_subdir_find(de, cp, next - cp);
if (!de) {
WARN(1, "name '%s'\n", name);