summaryrefslogtreecommitdiff
path: root/fs/btrfs/tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-03-15 16:43:11 +0100
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:24 +0200
commitd46a05edac440168a31805e583c8ab3f9c9561f9 (patch)
tree11b5b5a42a53ee965a12f4917358d4d861d0718f /fs/btrfs/tests
parent75391f0d41197e54b61ada92ddeffc28bf028c8c (diff)
btrfs: tests: handle fs_info allocation failure in extent_io tests
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
-rw-r--r--fs/btrfs/tests/extent-io-tests.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index e46ed2985b19..74f69df7a7e1 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -392,6 +392,10 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
? sectorsize * 4 : sectorsize;
fs_info = btrfs_alloc_dummy_fs_info(len, len);
+ if (!fs_info) {
+ test_err("could not allocate fs_info");
+ return -ENOMEM;
+ }
bitmap = kmalloc(len, GFP_KERNEL);
if (!bitmap) {