Skip to content

Commit

Permalink
9p: don't leave a half-initialized inode sitting around
Browse files Browse the repository at this point in the history
Cc: stable@vger.kernel.org # all branches
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 12, 2015
1 parent 1c4c715 commit 0a73d0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
unlock_new_inode(inode);
return inode;
error:
unlock_new_inode(inode);
iput(inode);
iget_failed(inode);
return ERR_PTR(retval);

}
Expand Down
3 changes: 1 addition & 2 deletions fs/9p/vfs_inode_dotl.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb,
unlock_new_inode(inode);
return inode;
error:
unlock_new_inode(inode);
iput(inode);
iget_failed(inode);
return ERR_PTR(retval);

}
Expand Down

0 comments on commit 0a73d0a

Please sign in to comment.