+ proc-less-lock-unlock-in-remove_proc_entry.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     proc: less LOCK/UNLOCK in remove_proc_entry()
has been added to the -mm tree.  Its filename is
     proc-less-lock-unlock-in-remove_proc_entry.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/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: proc: less LOCK/UNLOCK in remove_proc_entry()
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>

For the common case where a proc entry is being removed and nobody is in
the process of using it, save a LOCK/UNLOCK pair.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/generic.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff -puN fs/proc/generic.c~proc-less-lock-unlock-in-remove_proc_entry fs/proc/generic.c
--- a/fs/proc/generic.c~proc-less-lock-unlock-in-remove_proc_entry
+++ a/fs/proc/generic.c
@@ -826,12 +826,9 @@ void remove_proc_entry(const char *name,
 
 		wait_for_completion(de->pde_unload_completion);
 
-		goto continue_removing;
+		spin_lock(&de->pde_unload_lock);
 	}
-	spin_unlock(&de->pde_unload_lock);
 
-continue_removing:
-	spin_lock(&de->pde_unload_lock);
 	while (!list_empty(&de->pde_openers)) {
 		struct pde_opener *pdeo;
 
_

Patches currently in -mm which might be from adobriyan@xxxxxxxxx are

linux-next.patch
proc-use-unsigned-long-inside-proc-statm.patch
proc-use-seq_puts-seq_putc-where-possible.patch
proc-low_ino-cleanup.patch
proc-use-single_open-correctly.patch
proc-less-lock-unlock-in-remove_proc_entry.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux