diff options
-rw-r--r-- | fs/btrfs/bio.c | 3 | ||||
-rw-r--r-- | fs/btrfs/bio.h | 10 |
2 files changed, 2 insertions, 11 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 9bfdb90bd897..6ef953234068 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -223,7 +223,8 @@ static void btrfs_check_read_bio(struct btrfs_bio *bbio, struct btrfs_device *de offset += sectorsize; } - btrfs_bio_free_csum(bbio); + if (bbio->csum != bbio->csum_inline) + kfree(bbio->csum); if (fbio) btrfs_repair_done(fbio); 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. * |