Skip to content
Commit e950564b authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

vfs: don't evict uninitialized inode



iput() ends up calling ->evict() on new inode, which is not yet initialized
by owning fs.  So use destroy_inode() instead.

Add to sb->s_inodes list only if inode is not in I_CREATING state (meaning
that it wasn't allocated with new_inode(), which already does the
insertion).

Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Fixes: 80ea09a0 ("vfs: factor out inode_insert5()")
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a6cbedfa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment