From: Krzysztof Sachanowicz Date: Mon, 23 Feb 2009 21:21:55 +0000 (+0100) Subject: proc: proc_get_inode should de_put when inode already initialized X-Git-Tag: MMI-PSA29.97-13-9~29444 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cac711211a039ae2e2dc6322ffb3c2279d093bf1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Tested-by: Marcin Pilipczuk Acked-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 3e76bb9b3ad6..d8bb5c671f42 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: