Skip to content
Commit b36ec042 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christoph Hellwig
Browse files

xfs: fix freeing of inodes not yet added to the inode cache



When freeing an inode that lost race getting added to the inode cache we
must not call into ->destroy_inode, because that would delete the inode
that won the race from the inode cache radix tree.

This patch uses splits a new xfs_inode_free helper out of xfs_ireclaim
and uses that plus __destroy_inode to make sure we really only free
the memory allocted for the inode that lost the race, and not mess with
the inode cache state.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarEric Sandeen <sandeen@sandeen.net>
Reported-by: default avatarAlex Samad <alex@samad.com.au>
Reported-by: default avatarAndrew Randrianasulu <randrik@mail.ru>
Reported-by: default avatarStephane <sharnois@max-t.com>
Reported-by: default avatarTommy <tommy@news-service.com>
Reported-by: default avatarMiah Gregory <mace@darksilence.net>
Reported-by: default avatarGabriel Barazer <gabriel@oxeva.fr>
Reported-by: default avatarLeandro Lucarella <llucax@gmail.com>
Reported-by: default avatarDaniel Burr <dburr@fami.com.au>
Reported-by: default avatarNickolay <newmail@spaces.ru>
Reported-by: default avatarMichael Guntsche <mike@it-loops.com>
Reported-by: default avatarDan Carley <dan.carley+linuxkern-bugs@gmail.com>
Reported-by: default avatarMichael Ole Olsen <gnu@gmx.net>
Reported-by: default avatarMichael Weissenbacher <mw@dermichi.com>
Reported-by: default avatarMartin Spott <Martin.Spott@mgras.net>
Reported-by: default avatarChristian Kujau <lists@nerdbynature.de>
Tested-by: default avatarMichael Guntsche <mike@it-loops.com>
Tested-by: default avatarDan Carley <dan.carley+linuxkern-bugs@gmail.com>
Tested-by: default avatarChristian Kujau <lists@nerdbynature.de>
parent 2e00c97e
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