Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360499
b: refs/heads/master
c: a9870c0
h: refs/heads/master
i:
  360497: 9d09e10
  360495: 62bb13a
v: v3
  • Loading branch information
Wang Shilong authored and Josef Bacik committed Mar 1, 2013
1 parent bee0026 commit 5775caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 235fdb8ef2a313749cf3a42e70156c618263a388
refs/heads/master: a9870c0e031527fbfa382019f30d2e9b98124a0d
11 changes: 6 additions & 5 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4772,9 +4772,14 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
* ret != 0 here means the qgroup reservation failed, we go straight to
* the shared error handling then.
*/
if (ret == 0)
if (ret == 0) {
ret = reserve_metadata_bytes(root, block_rsv,
to_reserve, flush);
if (ret && root->fs_info->quota_enabled) {
btrfs_qgroup_free(root, num_bytes +
nr_extents * root->leafsize);
}
}

if (ret) {
u64 to_free = 0;
Expand Down Expand Up @@ -4805,10 +4810,6 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
btrfs_ino(inode),
to_free, 0);
}
if (root->fs_info->quota_enabled) {
btrfs_qgroup_free(root, num_bytes +
nr_extents * root->leafsize);
}
if (delalloc_lock)
mutex_unlock(&BTRFS_I(inode)->delalloc_mutex);
return ret;
Expand Down

0 comments on commit 5775caa

Please sign in to comment.