summaryrefslogtreecommitdiffstats
path: root/fs/ext2/ialloc.c
diff options
context:
space:
mode:
authorAl Viro2018-05-17 00:29:56 +0200
committerAl Viro2018-08-03 22:03:31 +0200
commit2e5afe54e0cd6fce79b51ca547caf08a990ad56d (patch)
treee1216c8896876b5f8e5e8a2dd990eacbb3236956 /fs/ext2/ialloc.c
parentudf: switch to discard_new_inode() (diff)
downloadkernel-qcow2-linux-2e5afe54e0cd6fce79b51ca547caf08a990ad56d.tar.gz
kernel-qcow2-linux-2e5afe54e0cd6fce79b51ca547caf08a990ad56d.tar.xz
kernel-qcow2-linux-2e5afe54e0cd6fce79b51ca547caf08a990ad56d.zip
ext2: make sure that partially set up inodes won't be returned by ext2_iget()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext2/ialloc.c')
-rw-r--r--fs/ext2/ialloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 6484199b35d1..5c3d7b7e4975 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -611,8 +611,7 @@ fail_drop:
dquot_drop(inode);
inode->i_flags |= S_NOQUOTA;
clear_nlink(inode);
- unlock_new_inode(inode);
- iput(inode);
+ discard_new_inode(inode);
return ERR_PTR(err);
fail: