diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-22 02:54:23 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-10-28 10:08:48 -0400 |
commit | 9856af8b535aaf51d95dab2087e79508f551fbb8 (patch) | |
tree | c8e706c42ac2fe6b2bab543b94522c71a9cff109 /fs/9p/vfs_inode.c | |
parent | f5fc6145f385a6287d3d63ee5cf3499ef038c699 (diff) |
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 <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | 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 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, | |||
1037 | 1037 | ||
1038 | result = v9fs_fid_add(dentry, fid); | 1038 | result = v9fs_fid_add(dentry, fid); |
1039 | if (result < 0) | 1039 | if (result < 0) |
1040 | goto error; | 1040 | goto error_iput; |
1041 | 1041 | ||
1042 | inst_out: | 1042 | inst_out: |
1043 | if (v9ses->cache) | 1043 | if (v9ses->cache) |
@@ -1048,6 +1048,8 @@ inst_out: | |||
1048 | d_add(dentry, inode); | 1048 | d_add(dentry, inode); |
1049 | return NULL; | 1049 | return NULL; |
1050 | 1050 | ||
1051 | error_iput: | ||
1052 | iput(inode); | ||
1051 | error: | 1053 | error: |
1052 | p9_client_clunk(fid); | 1054 | p9_client_clunk(fid); |
1053 | 1055 | ||