lkml.org 
[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectcleanup bio_kmalloc v2
Date
Hi Jens,

this series finishes off the bio allocation interface cleanups by dealing
with the weirdest member of the famility. bio_kmalloc combines a kmalloc
for the bio and bio_vecs with a hidden bio_init call and magic cleanup
semantics.

This series moves a few callers away from bio_kmalloc and then turns
bio_kmalloc into a simple wrapper for a slab allocation of a bio and the
inline biovecs. The callers need to manually call bio_init instead with
all that entails and the magic that turns bio_put into a kfree goes away
as well, allowing for a proper debug check in bio_put that catches
accidental use on a bio_init()ed bio.

Changes since v1:
- update a pre-existing comment per maintainer suggestion

Diffstat:
block/bio.c | 47 ++++++++++++++-----------------------
block/blk-crypto-fallback.c | 14 ++++++-----
block/blk-map.c | 42 +++++++++++++++++++++------------
drivers/block/pktcdvd.c | 34 +++++++++++---------------
drivers/md/bcache/debug.c | 10 ++++---
drivers/md/dm-bufio.c | 9 +++----
drivers/md/raid1.c | 12 ++++++---
drivers/md/raid10.c | 21 +++++++++++-----
drivers/target/target_core_pscsi.c | 36 ++++------------------------
fs/btrfs/disk-io.c | 8 +++---
fs/btrfs/volumes.c | 11 --------
fs/btrfs/volumes.h | 2 -
fs/squashfs/block.c | 14 +++--------
include/linux/bio.h | 2 -
14 files changed, 116 insertions(+), 146 deletions(-)

\
 
 \ /
  Last update: 2022-03-08 07:17    [W:0.968 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site