aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tests/inode-tests.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-06-15 03:20:26 +0200
committerDavid Sterba <dsterba@suse.cz>2014-12-12 18:26:55 +0100
commit3f556f7853ec4845a7c219d026cbcdf4cfa8cea7 (patch)
treecf3552bb4ed22bc7c46403549ca13043c40fe460 /fs/btrfs/tests/inode-tests.c
parentbtrfs: use GFP_NOFS in __alloc_extent_buffer directly (diff)
downloadlinux-dev-3f556f7853ec4845a7c219d026cbcdf4cfa8cea7.tar.xz
linux-dev-3f556f7853ec4845a7c219d026cbcdf4cfa8cea7.zip
btrfs: unify extent buffer allocation api
Make the extent buffer allocation interface consistent. Cloned eb will set a valid fs_info. For dummy eb, we can drop the length parameter and set it from fs_info. The built-in sanity checks may pass a NULL fs_info that's queried for nodesize, but we know it's 4096. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/tests/inode-tests.c')
-rw-r--r--fs/btrfs/tests/inode-tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tests/inode-tests.c b/fs/btrfs/tests/inode-tests.c
index 3ae0f5b8bb80..a116b55ce788 100644
--- a/fs/btrfs/tests/inode-tests.c
+++ b/fs/btrfs/tests/inode-tests.c
@@ -255,7 +255,7 @@ static noinline int test_btrfs_get_extent(void)
goto out;
}
- root->node = alloc_dummy_extent_buffer(0, 4096);
+ root->node = alloc_dummy_extent_buffer(NULL, 4096);
if (!root->node) {
test_msg("Couldn't allocate dummy buffer\n");
goto out;
@@ -843,7 +843,7 @@ static int test_hole_first(void)
goto out;
}
- root->node = alloc_dummy_extent_buffer(0, 4096);
+ root->node = alloc_dummy_extent_buffer(NULL, 4096);
if (!root->node) {
test_msg("Couldn't allocate dummy buffer\n");
goto out;