diff options
author | Tim Hansen <devtimhansen@gmail.com> | 2017-10-06 20:45:13 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-06 21:03:14 +0200 |
commit | 4078def82f352cf5007691635da290a109511bc5 (patch) | |
tree | c246c05286693c2fd06528a59ffe883e06b2706e /block/bio.c | |
parent | block: remove unnecessary NULL checks in bioset_integrity_free() (diff) | |
download | linux-4078def82f352cf5007691635da290a109511bc5.tar.xz linux-4078def82f352cf5007691635da290a109511bc5.zip |
block/bio: Remove null checks before mempool_destroy in bioset_free
This patch removes redundant checks for null values on bio_pool and
bvec_pool.
Found using make coccicheck M=block/ on linux-net tree on the
next-20170929 tag.
Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/bio.c b/block/bio.c index 8338304ea256..bf0dbe8f78f8 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1928,11 +1928,8 @@ void bioset_free(struct bio_set *bs) if (bs->rescue_workqueue) destroy_workqueue(bs->rescue_workqueue); - if (bs->bio_pool) - mempool_destroy(bs->bio_pool); - - if (bs->bvec_pool) - mempool_destroy(bs->bvec_pool); + mempool_destroy(bs->bio_pool); + mempool_destroy(bs->bvec_pool); bioset_integrity_free(bs); bio_put_slab(bs); |