Fix compiler warning in volumes.c
authorChris Mason <chris.mason@oracle.com>
Fri, 2 May 2008 19:05:11 +0000 (15:05 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Fri, 2 May 2008 19:05:11 +0000 (15:05 -0400)
btrfsck.c
volumes.c

index 5a89ac6..174c7f9 100644 (file)
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -606,6 +606,9 @@ static int run_next_block(struct btrfs_root *root,
 
                        data_bytes_allocated +=
                                btrfs_file_extent_disk_num_bytes(buf, fi);
+                       if (data_bytes_allocated < root->sectorsize) {
+                               abort();
+                       }
                        data_bytes_referenced +=
                                btrfs_file_extent_num_bytes(buf, fi);
                        ret = add_extent_rec(extent_cache, NULL, bytenr,
index 2d04f64..c94f73c 100644 (file)
--- a/volumes.c
+++ b/volumes.c
@@ -478,7 +478,7 @@ int btrfs_add_device(struct btrfs_trans_handle *trans,
        struct extent_buffer *leaf;
        struct btrfs_key key;
        unsigned long ptr;
-       u64 free_devid;
+       u64 free_devid = 0;
 
        root = root->fs_info->chunk_root;