All of lore.kernel.org
 help / color / mirror / Atom feed
* + proc-save-loc-in-__xlate_proc_name.patch added to -mm tree
@ 2021-03-28 22:17 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-03-28 22:17 UTC (permalink / raw)
  To: adobriyan, mm-commits


The patch titled
     Subject: proc: save LOC in __xlate_proc_name()
has been added to the -mm tree.  Its filename is
     proc-save-loc-in-__xlate_proc_name.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/proc-save-loc-in-__xlate_proc_name.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/proc-save-loc-in-__xlate_proc_name.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Alexey Dobriyan <adobriyan@gmail.com>
Subject: 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>
---

 fs/proc/generic.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

--- a/fs/proc/generic.c~proc-save-loc-in-__xlate_proc_name
+++ a/fs/proc/generic.c
@@ -166,15 +166,8 @@ static int __xlate_proc_name(const char
 	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, '/'))) {
 		de = pde_subdir_find(de, cp, next - cp);
 		if (!de) {
 			WARN(1, "name '%s'\n", name);
_

Patches currently in -mm which might be from adobriyan@gmail.com are

proc-save-loc-in-__xlate_proc_name.patch
proc-mandate-proc_lseek-in-struct-proc_ops.patch
proc-delete-redundant-subset=pid-check.patch
proc-test-subset=pid.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-28 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-28 22:17 + proc-save-loc-in-__xlate_proc_name.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.