]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use the commit_root for reading free_space_inode crcs
authorChris Mason <chris.mason@oracle.com>
Tue, 26 Jul 2011 19:35:09 +0000 (15:35 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 27 Jul 2011 16:46:48 +0000 (12:46 -0400)
commitc62e8776e8d306a7baf139a5685b178ffc4771d9
treeae37f2f4a2f4a797ee971a94ee2c29c55a8048dc
parent5cad4a5a412e14283b7b3723f3834f8eee2b0df2
Btrfs: use the commit_root for reading free_space_inode crcs

Now that we are using regular file crcs for the free space cache,
we can deadlock if we try to read the free_space_inode while we are
updating the crc tree.

This commit fixes things by using the commit_root to read the crcs.  This is
safe because we the free space cache file would already be loaded if
that block group had been changed in the current transaction.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/file-item.c
fs/btrfs/inode.c