#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <math.h>
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
#include "crc32c.h"
#include "volumes.h"
#include "free-space-cache.h"
-#include "math.h"
#include "utils.h"
#define PENDING_EXTENT_INSERT 0
if (info->extent_ops) {
struct btrfs_extent_ops *ops = info->extent_ops;
- ret = ops->alloc_extent(root, num_bytes, hint_byte, ins);
+ ret = ops->alloc_extent(root, num_bytes, hint_byte, ins, !data);
BUG_ON(ret);
goto found;
}
cache = kzalloc(sizeof(*cache), GFP_NOFS);
if (!cache) {
ret = -ENOMEM;
- break;
+ goto error;
}
read_extent_buffer(leaf, &cache->item,