From: Aneesh Kumar K.V Date: Wed, 22 Sep 2010 06:54:23 +0000 (+0530) Subject: fs/9p: Add missing iput in v9fs_vfs_lookup X-Git-Tag: v2.6.37-rc1~68^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9856af8b535aaf51d95dab2087e79508f551fbb8;p=karo-tx-linux.git fs/9p: Add missing iput in v9fs_vfs_lookup Make sure we drop inode reference in the error path Signed-off-by: Aneesh Kumar K.V Signed-off-by: Venkateswararao Jujjuri Signed-off-by: Eric Van Hensbergen --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 8f68280d752e..a69986c80328 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -1037,7 +1037,7 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, result = v9fs_fid_add(dentry, fid); if (result < 0) - goto error; + goto error_iput; inst_out: if (v9ses->cache) @@ -1048,6 +1048,8 @@ inst_out: d_add(dentry, inode); return NULL; +error_iput: + iput(inode); error: p9_client_clunk(fid);