• Kent Overstreet's avatar
    block: Generalized bio pool freeing · 395c72a7
    Kent Overstreet authored
    With the old code, when you allocate a bio from a bio pool you have to
    implement your own destructor that knows how to find the bio pool the
    bio was originally allocated from.
    
    This adds a new field to struct bio (bi_pool) and changes
    bio_alloc_bioset() to use it. This makes various bio destructors
    unnecessary, so they're then deleted.
    
    v6: Explain the temporary if statement in bio_put
    Signed-off-by: default avatarKent Overstreet <koverstreet@google.com>
    CC: Jens Axboe <axboe@kernel.dk>
    CC: NeilBrown <neilb@suse.de>
    CC: Alasdair Kergon <agk@redhat.com>
    CC: Nicholas Bellinger <nab@linux-iscsi.org>
    CC: Lars Ellenberg <lars.ellenberg@linbit.com>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    395c72a7
dm-crypt.c 43.2 KB