Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253087
b: refs/heads/master
c: cca1c81
h: refs/heads/master
i:
  253085: 25c4cf1
  253083: a5b90d9
  253079: 0406f6e
  253071: 61c72ab
  253055: 2a87299
v: v3
  • Loading branch information
Josef Bacik committed May 23, 2011
1 parent 3599d1b commit 7e22695
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 026fd317828500524cdc7e5ff9e8e7923abb2868
refs/heads/master: cca1c81f43e26ab60c0d1090fb90992358d69bdf
8 changes: 8 additions & 0 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5159,6 +5159,14 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
if (unlikely(block_group->ro))
goto loop;

spin_lock(&block_group->tree_lock);
if (cached &&
block_group->free_space < num_bytes + empty_size) {
spin_unlock(&block_group->tree_lock);
goto loop;
}
spin_unlock(&block_group->tree_lock);

/*
* Ok we want to try and use the cluster allocator, so lets look
* there, unless we are on LOOP_NO_EMPTY_SIZE, since we will
Expand Down

0 comments on commit 7e22695

Please sign in to comment.