summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKrzysztof Sachanowicz <analyzer1@gmail.com>2009-02-23 22:21:55 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-23 18:25:32 -0800
commitcac711211a039ae2e2dc6322ffb3c2279d093bf1 (patch)
treea910c047f30616462bb8312b86b0caff8a56fa85 /fs
parent226485e9a91ee89c941d8cb7714f85644a8071d0 (diff)
proc: proc_get_inode should de_put when inode already initialized
de_get is called before every proc_get_inode, but corresponding de_put is called only when dropping last reference to an inode. This might cause something like remove_proc_entry: /proc/stats busy, count=14496 to be printed to the syslog. The fix is to call de_put in case of an already initialized inode in proc_get_inode. Signed-off-by: Krzysztof Sachanowicz <analyzer1@gmail.com> Tested-by: Marcin Pilipczuk <marcin.pilipczuk@gmail.com> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 3e76bb9b3ad..d8bb5c671f4 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -485,8 +485,10 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
}
}
unlock_new_inode(inode);
- } else
+ } else {
module_put(de->owner);
+ de_put(de);
+ }
return inode;
out_ino: