diff options
| author | Alexey Dobriyan <[email protected]> | 2011-01-13 01:00:35 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2011-01-13 16:03:17 +0000 |
| commit | 3740a20c4fe8697cb604a7d51395d23472b1768f (patch) | |
| tree | dac4b07e654742bc60fad44c55327d8b3f86e4b3 /fs/proc/generic.c | |
| parent | kpagecount: add slab page checking because _mapcount is in a union (diff) | |
| download | kernel-3740a20c4fe8697cb604a7d51395d23472b1768f.tar.gz kernel-3740a20c4fe8697cb604a7d51395d23472b1768f.zip | |
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]>
Diffstat (limited to 'fs/proc/generic.c')
| -rw-r--r-- | fs/proc/generic.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index d00c5af6f199..01e07f2a188f 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -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; |
