diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-07-12 10:34:29 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-08-04 14:41:56 -0400 |
commit | 388d75e1e885e8fe0c705a6aa1ed818cf6396df3 (patch) | |
tree | d1bc004b75150d72d6cf3bc075f880058eb49905 /fs | |
parent | 82bec81e4d7d53b46fca391774271f801b18d6e5 (diff) | |
download | lwn-388d75e1e885e8fe0c705a6aa1ed818cf6396df3.tar.gz lwn-388d75e1e885e8fe0c705a6aa1ed818cf6396df3.zip |
9p: don't leave a half-initialized inode sitting around
[ Upstream commit 0a73d0a204a4a04a1e110539c5a524ae51f91d6d ]
Cc: stable@vger.kernel.org # all branches
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.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 296482fc77a9..a2f6e9ae1a98 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 02b64f4e576a..092d20c643e5 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c @@ -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); } |