summaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-10 08:48:35 +0100
committerDavid Sterba <dsterba@suse.com>2023-04-17 18:01:14 +0200
commit798c9fc74d034fca49031efb195e07e59bb926df (patch)
treec2fe46c430ff9f4e569b872736094b279ba3357e /fs/btrfs/compression.c
parent544fe4a903ce71fb8ecbc159db6f245ef3f691fe (diff)
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 <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>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index cd0cfa8fdb8c..6fd9c6efe387 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);
}