From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K.V" Subject: [PATCH 2/3] fs/9p: Add missing iput in v9fs_vfs_lookup Date: Tue, 5 Oct 2010 22:31:29 +0530 Message-ID: <1286298090-2422-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1286298090-2422-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K.V" To: v9fs-developer@lists.sourceforge.net Return-path: Received: from e28smtp08.in.ibm.com ([122.248.162.8]:35269 "EHLO e28smtp08.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753245Ab0JERBm (ORCPT ); Tue, 5 Oct 2010 13:01:42 -0400 In-Reply-To: <1286298090-2422-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Make sure we drop inode reference in the error path Signed-off-by: Aneesh Kumar K.V --- fs/9p/vfs_inode.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 1ec9075..1ac9229 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -1028,7 +1028,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) @@ -1039,6 +1039,8 @@ inst_out: d_add(dentry, inode); return NULL; +error_iput: + iput(inode); error: p9_client_clunk(fid); -- 1.7.0.4