From patchwork Tue Oct 5 17:01:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 233391 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o95I2GI6018869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 5 Oct 2010 18:02:37 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1P3Bq3-0006SJ-Sj; Tue, 05 Oct 2010 18:02:07 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1P3Bq1-0006SD-Um for v9fs-developer@lists.sourceforge.net; Tue, 05 Oct 2010 18:02:05 +0000 X-ACL-Warn: Received: from e28smtp05.in.ibm.com ([122.248.162.5]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1P3Bpz-0004Hc-7d for v9fs-developer@lists.sourceforge.net; Tue, 05 Oct 2010 18:02:05 +0000 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp05.in.ibm.com (8.14.4/8.13.1) with ESMTP id o95H1dAx027448 for ; Tue, 5 Oct 2010 22:31:39 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o95H1dnB4477160 for ; Tue, 5 Oct 2010 22:31:39 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o95H1cBK017833 for ; Tue, 5 Oct 2010 22:31:39 +0530 Received: from localhost.localdomain ([9.77.201.212]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o95H1Ygx017328; Tue, 5 Oct 2010 22:31:37 +0530 From: "Aneesh Kumar K.V" To: v9fs-developer@lists.sourceforge.net Date: Tue, 5 Oct 2010 22:31:29 +0530 Message-Id: <1286298090-2422-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286298090-2422-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1286298090-2422-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Spam-Score: -0.3 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.2 AWL AWL: From: address is in the auto white-list X-Headers-End: 1P3Bpz-0004Hc-7d Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [V9fs-developer] [PATCH 2/3] fs/9p: Add missing iput in v9fs_vfs_lookup X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Oct 2010 18:02:37 +0000 (UTC) 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);