diff options
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index e88330d3df52..202008ec367d 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -748,13 +748,6 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, | |||
748 | u64 used = btrfs_block_group_used(&block_group->item); | 748 | u64 used = btrfs_block_group_used(&block_group->item); |
749 | 749 | ||
750 | /* | 750 | /* |
751 | * If we're unmounting then just return, since this does a search on the | ||
752 | * normal root and not the commit root and we could deadlock. | ||
753 | */ | ||
754 | if (btrfs_fs_closing(fs_info)) | ||
755 | return 0; | ||
756 | |||
757 | /* | ||
758 | * If this block group has been marked to be cleared for one reason or | 751 | * If this block group has been marked to be cleared for one reason or |
759 | * another then we can't trust the on disk cache, so just return. | 752 | * another then we can't trust the on disk cache, so just return. |
760 | */ | 753 | */ |
@@ -768,6 +761,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info, | |||
768 | path = btrfs_alloc_path(); | 761 | path = btrfs_alloc_path(); |
769 | if (!path) | 762 | if (!path) |
770 | return 0; | 763 | return 0; |
764 | path->search_commit_root = 1; | ||
765 | path->skip_locking = 1; | ||
771 | 766 | ||
772 | inode = lookup_free_space_inode(root, block_group, path); | 767 | inode = lookup_free_space_inode(root, block_group, path); |
773 | if (IS_ERR(inode)) { | 768 | if (IS_ERR(inode)) { |