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)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Jul 2015 15:22:05 +0000 (11:22 -0400)
Cc: stable@vger.kernel.org # all branches
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c

index 510040b..b1dc518 100644 (file)
@@ -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);
 
 }
index 09e4433..e8aa57d 100644 (file)
@@ -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);
 
 }