vfs: add __destroy_inode
commite22d4dae5a805ca986063fa304d2125b98910fc2
authorChristoph Hellwig <hch@infradead.org>
Wed, 19 Aug 2009 18:43:00 +0000 (19 14:43 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:56 +0000 (8 20:33 -0700)
tree1961217a19b40c26081654f2ad031f0c46ab39d0
parentb1abc2814585a3a13ce725ba62f62e9dc531010c
vfs: add __destroy_inode

backport of upstream commit 2e00c97e2c1d2ffc9e26252ca26b237678b0b772

When we want to tear down an inode that lost the add to the cache race
in XFS 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 provides the __destroy_inode helper needed to fix this,
the actual fix will be in th next patch.  As XFS was the only reason
destroy_inode was exported we shift the export to the new __destroy_inode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/inode.c
include/linux/fs.h