btrfs-progs: fix type mismatch in backtrace dumping functions
[platform/upstream/btrfs-progs.git] / extent_io.c
index 88e9273..c99d362 100644 (file)
@@ -27,6 +27,7 @@
 #include "list.h"
 #include "ctree.h"
 #include "volumes.h"
+#include "internal.h"
 
 void extent_io_tree_init(struct extent_io_tree *tree)
 {
@@ -770,7 +771,7 @@ int write_data_to_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
                        u64 stripe_len = this_len;
 
                        this_len = min(this_len, bytes_left);
-                       this_len = min(this_len, (u64)info->tree_root->leafsize);
+                       this_len = min(this_len, (u64)info->tree_root->nodesize);
 
                        eb = malloc(sizeof(struct extent_buffer) + this_len);
                        BUG_ON(!eb);