From: Christoph Hellwig Date: Fri, 10 Feb 2023 07:48:35 +0000 (+0100) Subject: btrfs: remove redundant free_extent_map in btrfs_submit_compressed_read X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=798c9fc74d034fca49031efb195e07e59bb926df;p=linux.git btrfs: remove redundant free_extent_map in btrfs_submit_compressed_read 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 Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index cd0cfa8fdb8c1..6fd9c6efe387b 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -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); }