Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299220
b: refs/heads/master
c: d53ba47
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Apr 13, 2012
1 parent 3f172ef commit 59eddd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4edc2ca388d62abffe38149f6ac00e749ea721c5
refs/heads/master: d53ba47484ed6245e640ee4bfe9d21e9bfc15765
4 changes: 1 addition & 3 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache,
* allocate blocks for the tree root we can't do the fast caching since
* we likely hold important locks.
*/
if (trans && (!trans->transaction->in_commit) &&
(root && root != root->fs_info->tree_root) &&
btrfs_test_opt(root, SPACE_CACHE)) {
if (fs_info->mount_opt & BTRFS_MOUNT_SPACE_CACHE) {
ret = load_free_space_cache(fs_info, cache);

spin_lock(&cache->lock);
Expand Down
9 changes: 2 additions & 7 deletions trunk/fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,6 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
bool matched;
u64 used = btrfs_block_group_used(&block_group->item);

/*
* If we're unmounting then just return, since this does a search on the
* normal root and not the commit root and we could deadlock.
*/
if (btrfs_fs_closing(fs_info))
return 0;

/*
* If this block group has been marked to be cleared for one reason or
* another then we can't trust the on disk cache, so just return.
Expand All @@ -768,6 +761,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
path = btrfs_alloc_path();
if (!path)
return 0;
path->search_commit_root = 1;
path->skip_locking = 1;

inode = lookup_free_space_inode(root, block_group, path);
if (IS_ERR(inode)) {
Expand Down

0 comments on commit 59eddd5

Please sign in to comment.