mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: Ues bi_pool for bio_integrity_alloc()
Now that bios keep track of where they were allocated from, bio_integrity_alloc_bioset() becomes redundant. Remove bio_integrity_alloc_bioset() and drop bio_set argument from the related functions and make them use bio->bi_pool. Signed-off-by: Kent Overstreet <[email protected]> CC: Jens Axboe <[email protected]> CC: Martin K. Petersen <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
395c72a707
commit
1e2a410ff7
6 changed files with 26 additions and 41 deletions
6
fs/bio.c
6
fs/bio.c
|
|
@ -241,7 +241,7 @@ void bio_free(struct bio *bio, struct bio_set *bs)
|
|||
bvec_free_bs(bs, bio->bi_io_vec, BIO_POOL_IDX(bio));
|
||||
|
||||
if (bio_integrity(bio))
|
||||
bio_integrity_free(bio, bs);
|
||||
bio_integrity_free(bio);
|
||||
|
||||
/*
|
||||
* If we have front padding, adjust the bio pointer before freeing
|
||||
|
|
@ -341,7 +341,7 @@ EXPORT_SYMBOL(bio_alloc);
|
|||
static void bio_kmalloc_destructor(struct bio *bio)
|
||||
{
|
||||
if (bio_integrity(bio))
|
||||
bio_integrity_free(bio, fs_bio_set);
|
||||
bio_integrity_free(bio);
|
||||
kfree(bio);
|
||||
}
|
||||
|
||||
|
|
@ -480,7 +480,7 @@ struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask)
|
|||
if (bio_integrity(bio)) {
|
||||
int ret;
|
||||
|
||||
ret = bio_integrity_clone(b, bio, gfp_mask, fs_bio_set);
|
||||
ret = bio_integrity_clone(b, bio, gfp_mask);
|
||||
|
||||
if (ret < 0) {
|
||||
bio_put(b);
|
||||
|
|
|
|||
Loading…
Reference in a new issue