From: Al Viro Date: Sun, 12 Jul 2015 14:34:29 +0000 (-0400) Subject: 9p: don't leave a half-initialized inode sitting around X-Git-Tag: v3.2.71~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=755a47431bd5deb3ecadc1f0c944c74569b590b6;p=thirdparty%2Fkernel%2Fstable.git 9p: don't leave a half-initialized inode sitting around commit 0a73d0a204a4a04a1e110539c5a524ae51f91d6d upstream. Signed-off-by: Al Viro Signed-off-by: Ben Hutchings --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 879ed88517373..bf1df722dc025 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -527,8 +527,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); } diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index 30d4fa826e7c2..dbbc83f6dc3b9 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c @@ -169,8 +169,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); }