btrfs: btrfs_bio_alloc never fails, skip error handling
authorDavid Sterba <dsterba@suse.com>
Fri, 2 Jun 2017 15:38:30 +0000 (17:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:26:02 +0000 (18:26 +0200)
Update direct callers of btrfs_bio_alloc that do error handling, that we
can now remove.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index 9ff3e78b9ef155db4034abf320d3ded9398560ee..e15bd02e534fd12f5eaeb20e33f472ff4c6cf772 100644 (file)
@@ -2808,9 +2808,6 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree,
 
        bio = btrfs_bio_alloc(bdev, sector, BIO_MAX_PAGES,
                        GFP_NOFS | __GFP_HIGH);
-       if (!bio)
-               return -ENOMEM;
-
        bio_add_page(bio, page, page_size, offset);
        bio->bi_end_io = end_io_func;
        bio->bi_private = tree;