btrfs: remove redundant free_extent_map in btrfs_submit_compressed_read
authorChristoph Hellwig <hch@lst.de>
Fri, 10 Feb 2023 07:48:35 +0000 (08:48 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:14 +0000 (18:01 +0200)
em can't be non-NULL after the free_extent_map label.  Also remove
the now pointless clearing of em to NULL after freeing it.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c

index cd0cfa8fdb8c15dfd68de8468cc338b6a8855e28..6fd9c6efe387bd78e4f6d3501e13bc62a66d70b6 100644 (file)
@@ -572,7 +572,6 @@ void btrfs_submit_compressed_read(struct bio *bio, int mirror_num)
        cb->orig_bio = bio;
 
        free_extent_map(em);
-       em = NULL;
 
        cb->nr_pages = DIV_ROUND_UP(compressed_len, PAGE_SIZE);
        cb->compressed_pages = kcalloc(cb->nr_pages, sizeof(struct page *), GFP_NOFS);
@@ -629,7 +628,6 @@ out_free_compressed_pages:
        kfree(cb->compressed_pages);
 out_free_bio:
        bio_put(comp_bio);
-       free_extent_map(em);
 out:
        btrfs_bio_end_io(btrfs_bio(bio), ret);
 }