diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-07-12 10:34:29 -0400 |
---|---|---|
committer | Zefan Li <lizefan@huawei.com> | 2016-03-21 09:17:41 +0800 |
commit | 1247d2434a3e0d1a64905ff1d0b5e6c158a56242 (patch) | |
tree | 427b8fe09e3a39269e08aaf22ac0a4e51d2328cb /fs | |
parent | 580fc1504f13683d46bbab083a286f227862f6ed (diff) |
9p: don't leave a half-initialized inode sitting around
commit 0a73d0a204a4a04a1e110539c5a524ae51f91d6d upstream.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_inode.c | 3 | ||||
-rw-r--r-- | fs/9p/vfs_inode_dotl.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 014c8dd62962..c9b32dcf820d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -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); } diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index a86a78d8e614..5cfbaddd3ec5 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); } |