summaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-07-12 10:34:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-07-12 11:22:05 -0400
commit0a73d0a204a4a04a1e110539c5a524ae51f91d6d (patch)
treeff24244f8ae4d5ddf389878e8743c055a24bc23e /fs/9p
parent1c4c7159ed2468f3ac4ce5a7f08d79663d381a93 (diff)
9p: don't leave a half-initialized inode sitting around
Cc: stable@vger.kernel.org # all branches Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c3
-rw-r--r--fs/9p/vfs_inode_dotl.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 510040b04c96..b1dc51888048 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -540,8 +540,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
540 unlock_new_inode(inode); 540 unlock_new_inode(inode);
541 return inode; 541 return inode;
542error: 542error:
543 unlock_new_inode(inode); 543 iget_failed(inode);
544 iput(inode);
545 return ERR_PTR(retval); 544 return ERR_PTR(retval);
546 545
547} 546}
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 09e4433717b8..e8aa57dc8d6d 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -149,8 +149,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb,
149 unlock_new_inode(inode); 149 unlock_new_inode(inode);
150 return inode; 150 return inode;
151error: 151error:
152 unlock_new_inode(inode); 152 iget_failed(inode);
153 iput(inode);
154 return ERR_PTR(retval); 153 return ERR_PTR(retval);
155 154
156} 155}