mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
proc: less LOCK/UNLOCK in remove_proc_entry()
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a6fc86d2b4
commit
3740a20c4f
1 changed files with 1 additions and 4 deletions
|
|
@ -826,12 +826,9 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue