You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] kill bio->bi_set
Jens: ->bi_set is totally unnecessary bloat of struct bio. Just define a proper destructor for the bio and it already knows what bio_set it belongs too. Peter: Fixed the bugs. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Peter Osterlund <petero2@telia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6f00df24ee
commit
3676347a5e
@@ -239,6 +239,11 @@ static void vm_dp_init(struct dpages *dp, void *data)
|
||||
dp->context_ptr = data;
|
||||
}
|
||||
|
||||
static void dm_bio_destructor(struct bio *bio)
|
||||
{
|
||||
bio_free(bio, _bios);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
* IO routines that accept a list of pages.
|
||||
*---------------------------------------------------------------*/
|
||||
@@ -263,6 +268,7 @@ static void do_region(int rw, unsigned int region, struct io_region *where,
|
||||
bio->bi_bdev = where->bdev;
|
||||
bio->bi_end_io = endio;
|
||||
bio->bi_private = io;
|
||||
bio->bi_destructor = dm_bio_destructor;
|
||||
bio_set_region(bio, region);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user