Skip to content

Commit 0a73d0a

Browse files
author
Al Viro
committed
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>
1 parent 1c4c715 commit 0a73d0a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

fs/9p/vfs_inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
540540
unlock_new_inode(inode);
541541
return inode;
542542
error:
543-
unlock_new_inode(inode);
544-
iput(inode);
543+
iget_failed(inode);
545544
return ERR_PTR(retval);
546545

547546
}

fs/9p/vfs_inode_dotl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb,
149149
unlock_new_inode(inode);
150150
return inode;
151151
error:
152-
unlock_new_inode(inode);
153-
iput(inode);
152+
iget_failed(inode);
154153
return ERR_PTR(retval);
155154

156155
}

0 commit comments

Comments
 (0)