Commit 85e77d46 authored by Al Viro's avatar Al Viro Committed by Jiri Slaby

9p: don't leave a half-initialized inode sitting around

commit 0a73d0a2 upstream.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 45a2159c
...@@ -537,8 +537,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb, ...@@ -537,8 +537,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
unlock_new_inode(inode); unlock_new_inode(inode);
return inode; return inode;
error: error:
unlock_new_inode(inode); iget_failed(inode);
iput(inode);
return ERR_PTR(retval); return ERR_PTR(retval);
} }
......
...@@ -151,8 +151,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb, ...@@ -151,8 +151,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb,
unlock_new_inode(inode); unlock_new_inode(inode);
return inode; return inode;
error: error:
unlock_new_inode(inode); iget_failed(inode);
iput(inode);
return ERR_PTR(retval); return ERR_PTR(retval);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment