]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/btrfs/tests/extent-io-tests.c
btrfs: pull node/sector/stripe sizes out of root and into fs_info
[mirror_ubuntu-bionic-kernel.git] / fs / btrfs / tests / extent-io-tests.c
index 2c7a0a9225101587194c30ce390588e14bf1db3c..133753232a94d04b484c073ef045565908e935d3 100644 (file)
@@ -383,6 +383,7 @@ static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb,
 
 static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
 {
+       struct btrfs_fs_info *fs_info;
        unsigned long len;
        unsigned long *bitmap;
        struct extent_buffer *eb;
@@ -397,13 +398,15 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
        len = (sectorsize < BTRFS_MAX_METADATA_BLOCKSIZE)
                ? sectorsize * 4 : sectorsize;
 
+       fs_info = btrfs_alloc_dummy_fs_info(len, len);
+
        bitmap = kmalloc(len, GFP_KERNEL);
        if (!bitmap) {
                test_msg("Couldn't allocate test bitmap\n");
                return -ENOMEM;
        }
 
-       eb = __alloc_dummy_extent_buffer(NULL, 0, len);
+       eb = __alloc_dummy_extent_buffer(fs_info, 0, len);
        if (!eb) {
                test_msg("Couldn't allocate test extent buffer\n");
                kfree(bitmap);