diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio-integrity.c | 3 | ||||
-rw-r--r-- | fs/bio.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index e49cce234c65..9c5e6b2cd11a 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -761,6 +761,9 @@ int bioset_integrity_create(struct bio_set *bs, int pool_size) | |||
761 | { | 761 | { |
762 | unsigned int max_slab = vecs_to_idx(BIO_MAX_PAGES); | 762 | unsigned int max_slab = vecs_to_idx(BIO_MAX_PAGES); |
763 | 763 | ||
764 | if (bs->bio_integrity_pool) | ||
765 | return 0; | ||
766 | |||
764 | bs->bio_integrity_pool = | 767 | bs->bio_integrity_pool = |
765 | mempool_create_slab_pool(pool_size, bip_slab[max_slab].slab); | 768 | mempool_create_slab_pool(pool_size, bip_slab[max_slab].slab); |
766 | 769 | ||
@@ -1636,9 +1636,6 @@ struct bio_set *bioset_create(unsigned int pool_size, unsigned int front_pad) | |||
1636 | if (!bs->bio_pool) | 1636 | if (!bs->bio_pool) |
1637 | goto bad; | 1637 | goto bad; |
1638 | 1638 | ||
1639 | if (bioset_integrity_create(bs, pool_size)) | ||
1640 | goto bad; | ||
1641 | |||
1642 | if (!biovec_create_pools(bs, pool_size)) | 1639 | if (!biovec_create_pools(bs, pool_size)) |
1643 | return bs; | 1640 | return bs; |
1644 | 1641 | ||
@@ -1682,6 +1679,9 @@ static int __init init_bio(void) | |||
1682 | if (!fs_bio_set) | 1679 | if (!fs_bio_set) |
1683 | panic("bio: can't allocate bios\n"); | 1680 | panic("bio: can't allocate bios\n"); |
1684 | 1681 | ||
1682 | if (bioset_integrity_create(fs_bio_set, BIO_POOL_SIZE)) | ||
1683 | panic("bio: can't create integrity pool\n"); | ||
1684 | |||
1685 | bio_split_pool = mempool_create_kmalloc_pool(BIO_SPLIT_ENTRIES, | 1685 | bio_split_pool = mempool_create_kmalloc_pool(BIO_SPLIT_ENTRIES, |
1686 | sizeof(struct bio_pair)); | 1686 | sizeof(struct bio_pair)); |
1687 | if (!bio_split_pool) | 1687 | if (!bio_split_pool) |