aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a541bc87f04c..ddaf6340fe7f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3413,7 +3413,7 @@ again:
3413 * our reservation. 3413 * our reservation.
3414 */ 3414 */
3415 if (unused <= space_info->total_bytes) { 3415 if (unused <= space_info->total_bytes) {
3416 unused -= space_info->total_bytes; 3416 unused = space_info->total_bytes - unused;
3417 if (unused >= num_bytes) { 3417 if (unused >= num_bytes) {
3418 if (!reserved) 3418 if (!reserved)
3419 space_info->bytes_reserved += orig_bytes; 3419 space_info->bytes_reserved += orig_bytes;