From 7ab0fdfc810209fc493f2f67bdd41d5aafbc3a05 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 21 Jan 2023 07:50:08 +0100 Subject: btrfs: open code btrfs_bio_free_csum btrfs_bio_free_csum has only one caller left, and that caller is always for an data inode and doesn't need zeroing of the csum pointer as that pointer will never be touched again. Just open code the conditional kfree there. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/bio.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'fs/btrfs/bio.h') diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h index 8d69d0b226d9..996275eb1062 100644 --- a/fs/btrfs/bio.h +++ b/fs/btrfs/bio.h @@ -94,16 +94,6 @@ static inline void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status) bbio->end_io(bbio); } -static inline void btrfs_bio_free_csum(struct btrfs_bio *bbio) -{ - if (bbio->is_metadata) - return; - if (bbio->csum != bbio->csum_inline) { - kfree(bbio->csum); - bbio->csum = NULL; - } -} - /* * Iterate through a btrfs_bio (@bbio) on a per-sector basis. * -- cgit