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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9ee6bd55e16c..9f5fdd37451d 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3425,6 +3425,10 @@ static int shrink_delalloc(struct btrfs_trans_handle *trans,
3425 if (reserved == 0) 3425 if (reserved == 0)
3426 return 0; 3426 return 0;
3427 3427
3428 /* nothing to shrink - nothing to reclaim */
3429 if (root->fs_info->delalloc_bytes == 0)
3430 return 0;
3431
3428 max_reclaim = min(reserved, to_reclaim); 3432 max_reclaim = min(reserved, to_reclaim);
3429 3433
3430 while (loops < 1024) { 3434 while (loops < 1024) {