• Dave Chinner's avatar
    xfs: fix double free of inode · 705db3fd
    Dave Chinner authored
    If we fail to initialise the VFS inode in inode_init_always(),
    it will call ->delete_inode internally resulting in the inode being
    freed. Hence we need to delay the call to inode_init_always()
    until after the XFS inode is sufficient set up to handle a
    call to ->delete_inode, and then if that fails do not touch
    the inode again at all as it has been freed.
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    705db3fd
xfs_iget.c 23.1 KB