Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287897
b: refs/heads/master
c: d9b0218
h: refs/heads/master
i:
  287895: e332125
v: v3
  • Loading branch information
Liu Bo authored and David Sterba committed Feb 16, 2012
1 parent b4b3a0a commit 375faaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 9d47c7671dc555e198c7347a173ed37316e0c4c1
refs/heads/master: d9b0218f6cb682aa6a4ada2bfc5a25fdf3018563
5 changes: 4 additions & 1 deletion trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3611,12 +3611,15 @@ static int may_commit_transaction(struct btrfs_root *root,
if (space_info != delayed_rsv->space_info)
return -ENOSPC;

spin_lock(&space_info->lock);
spin_lock(&delayed_rsv->lock);
if (delayed_rsv->size < bytes) {
if (space_info->bytes_pinned + delayed_rsv->size < bytes) {
spin_unlock(&delayed_rsv->lock);
spin_unlock(&space_info->lock);
return -ENOSPC;
}
spin_unlock(&delayed_rsv->lock);
spin_unlock(&space_info->lock);

commit:
trans = btrfs_join_transaction(root);
Expand Down

0 comments on commit 375faaf

Please sign in to comment.