diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4c910359c807..5f6bc283c0c8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -2846,7 +2846,7 @@ int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root, | |||
2846 | } | 2846 | } |
2847 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 2847 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
2848 | 2848 | ||
2849 | BTRFS_I(inode)->reserved_extents--; | 2849 | BTRFS_I(inode)->reserved_extents -= num_items; |
2850 | BUG_ON(BTRFS_I(inode)->reserved_extents < 0); | 2850 | BUG_ON(BTRFS_I(inode)->reserved_extents < 0); |
2851 | 2851 | ||
2852 | if (meta_sinfo->bytes_delalloc < num_bytes) { | 2852 | if (meta_sinfo->bytes_delalloc < num_bytes) { |
@@ -3111,7 +3111,7 @@ again: | |||
3111 | return -ENOSPC; | 3111 | return -ENOSPC; |
3112 | } | 3112 | } |
3113 | 3113 | ||
3114 | BTRFS_I(inode)->reserved_extents++; | 3114 | BTRFS_I(inode)->reserved_extents += num_items; |
3115 | check_force_delalloc(meta_sinfo); | 3115 | check_force_delalloc(meta_sinfo); |
3116 | spin_unlock(&meta_sinfo->lock); | 3116 | spin_unlock(&meta_sinfo->lock); |
3117 | 3117 | ||