]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
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:18 +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 703342e309f57af329085db6d8f0b1b4814793dd..53f1e8a217071c13e4a3bb90771b97274e727521 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 9861c7c951a6dbd293e78d84e190f0908b4a1921..4d3ecfb55fcf8da4c1211932b188c6d18bbe1a8e 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);
 
 }