diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
commit | c3cc99ff5d24e2eeaf7ec2032e720681916990e3 (patch) | |
tree | c3e74171bbbd2adde9d60b9db1c440415c8d2831 /fs/proc/generic.c | |
parent | 38ffbe66d59051fd9cfcfc8545f164700e2fa3bc (diff) | |
parent | 024e8ac04453b3525448c31ef39848cf675ba6db (diff) |
Merge branch 'linus' into x86/xen
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 43e54e86cefd..bc0a0dd2d844 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -597,6 +597,7 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, | |||
597 | ent->pde_users = 0; | 597 | ent->pde_users = 0; |
598 | spin_lock_init(&ent->pde_unload_lock); | 598 | spin_lock_init(&ent->pde_unload_lock); |
599 | ent->pde_unload_completion = NULL; | 599 | ent->pde_unload_completion = NULL; |
600 | INIT_LIST_HEAD(&ent->pde_openers); | ||
600 | out: | 601 | out: |
601 | return ent; | 602 | return ent; |
602 | } | 603 | } |
@@ -789,6 +790,19 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent) | |||
789 | spin_unlock(&de->pde_unload_lock); | 790 | spin_unlock(&de->pde_unload_lock); |
790 | 791 | ||
791 | continue_removing: | 792 | continue_removing: |
793 | spin_lock(&de->pde_unload_lock); | ||
794 | while (!list_empty(&de->pde_openers)) { | ||
795 | struct pde_opener *pdeo; | ||
796 | |||
797 | pdeo = list_first_entry(&de->pde_openers, struct pde_opener, lh); | ||
798 | list_del(&pdeo->lh); | ||
799 | spin_unlock(&de->pde_unload_lock); | ||
800 | pdeo->release(pdeo->inode, pdeo->file); | ||
801 | kfree(pdeo); | ||
802 | spin_lock(&de->pde_unload_lock); | ||
803 | } | ||
804 | spin_unlock(&de->pde_unload_lock); | ||
805 | |||
792 | if (S_ISDIR(de->mode)) | 806 | if (S_ISDIR(de->mode)) |
793 | parent->nlink--; | 807 | parent->nlink--; |
794 | de->nlink = 0; | 808 | de->nlink = 0; |