9p: don't leave a half-initialized inode sitting around
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Jul 2015 14:34:29 +0000 (10:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:47 +0000 (09:29 -0700)
commit 0a73d0a204a4a04a1e110539c5a524ae51f91d6d upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c

index d86edc8d3fd05a0176e73136eedb50641eb091b0..4c7d309e4aa6ea311852631f4852bf5013e1b04f 100644 (file)
@@ -537,8 +537,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);
 
 }
index 53687bbf2296f8b799583786b16b59a574369f9e..65b21a24841e598522053659ab7b60f95406f121 100644 (file)
@@ -151,8 +151,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);
 
 }