mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + proc-delete-redundant-subset=pid-check.patch added to -mm tree
@ 2021-03-28 22:14 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-03-28 22:14 UTC (permalink / raw)
  To: adobriyan, gladkov.alexey, mm-commits


The patch titled
     Subject: proc: delete redundant subset=pid check
has been added to the -mm tree.  Its filename is
     proc-delete-redundant-subset=pid-check.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/proc-delete-redundant-subset%3Dpid-check.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/proc-delete-redundant-subset%3Dpid-check.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: delete redundant subset=pid check

Two checks in lookup and readdir code should be enough to not have third
check in open code.

Can't open what can't be looked up?

Link: https://lkml.kernel.org/r/YFYYwIBIkytqnkxP@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/inode.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/fs/proc/inode.c~proc-delete-redundant-subset=pid-check
+++ a/fs/proc/inode.c
@@ -493,7 +493,6 @@ proc_reg_get_unmapped_area(struct file *
 
 static int proc_reg_open(struct inode *inode, struct file *file)
 {
-	struct proc_fs_info *fs_info = proc_sb_info(inode->i_sb);
 	struct proc_dir_entry *pde = PDE(inode);
 	int rv = 0;
 	typeof_member(struct proc_ops, proc_open) open;
@@ -507,9 +506,6 @@ static int proc_reg_open(struct inode *i
 		return rv;
 	}
 
-	if (fs_info->pidonly == PROC_PIDONLY_ON)
-		return -ENOENT;
-
 	/*
 	 * Ensure that
 	 * 1) PDE's ->release hook will be called no matter what
_

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

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:15 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:14 + proc-delete-redundant-subset=pid-check.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).