Josef Bacik a6dbd429d8 Btrfs: fix panic when trying to destroy a newly allocated
There is a problem where iget5_locked will look for an inode, not find it, and
then subsequently try to allocate it.  Another CPU will have raced in and
allocated the inode instead, so when iget5_locked gets the inode spin lock again
and does a search, it finds the new inode.  So it goes ahead and calls
destroy_inode on the inode it just allocated.  The problem is we don't set
BTRFS_I(inode)->root until the new inode is completely initialized.  This patch
makes us set root to NULL when alloc'ing a new inode, so when we get to
btrfs_destroy_inode and we see that root is NULL we can just free up the memory
and continue on.  This fixes the panic

http://www.kerneloops.org/submitresult.php?number=812690

Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-11-11 15:53:34 -05:00
..
2009-10-13 13:51:39 -04:00
2009-10-14 10:32:49 -04:00
2008-09-25 11:04:06 -04:00
2009-02-04 09:28:28 -05:00
2009-04-02 16:46:06 -04:00
2009-10-14 10:32:49 -04:00
2009-01-05 21:25:51 -05:00
2009-09-29 13:51:04 -04:00
2009-10-13 13:51:39 -04:00
2009-02-04 09:29:13 -05:00