Btrfs: period commit during initial fill in the random tester
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f7ca536..b1a8149 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -11,7 +11,6 @@
#include "disk-io.h"
static int allocated_blocks = 0;
-int cache_size = 0;
int cache_max = 10000;
static int check_tree_block(struct ctree_root *root, struct tree_buffer *buf)
@@ -36,7 +35,7 @@
list_del_init(&b->cache);
tree_block_release(root, b);
if (root->cache_size < cache_max)
- return 0;
+ break;
}
}
return 0;