]> Git Repo - linux.git/blobdiff - fs/btrfs/extent_io.c
btrfs: return error pointer from alloc_test_extent_buffer
[linux.git] / fs / btrfs / extent_io.c
index eb8bd0258360f95d7d62148b122cd07eadfcbc90..2f4802f405a246e71d9ac2602b98ef494a535f0e 100644 (file)
@@ -5074,12 +5074,14 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
                return eb;
        eb = alloc_dummy_extent_buffer(fs_info, start);
        if (!eb)
-               return NULL;
+               return ERR_PTR(-ENOMEM);
        eb->fs_info = fs_info;
 again:
        ret = radix_tree_preload(GFP_NOFS);
-       if (ret)
+       if (ret) {
+               exists = ERR_PTR(ret);
                goto free_eb;
+       }
        spin_lock(&fs_info->buffer_lock);
        ret = radix_tree_insert(&fs_info->buffer_radix,
                                start >> PAGE_SHIFT, eb);
This page took 0.03329 seconds and 4 git commands to generate.