Skip to contentSkip to conversation

block/bio: Remove null checks before mempool_destroy in bioset_free

PATCH Applied Tim Hansen 2 participants 3 messages Oct 6, 2017 Block layer

lore
Share & tools
lore

Tim Hansen

author
#0 lore raw

PATCH 1/1 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.

Related to patch 9987695 that removed similar checks in bio-integrity.

---
 block/bio.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
block/bio.c +2 -5
index 8338304..bf0dbe8 100644
@@ -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);
Signature · 1 line
2.1.4
maintainer Applied
#1 lore raw
Quoted 5 lines · Tim Hansen

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.

Related to patch 9987695 that removed similar checks in bio-integrity.

Applied, but ditto on the line length. Additionally, I killed that reference to "patch 9987695", I don't know what that means? What does that refer to?

Signature · 1 line
Jens Axboe
author
#2 lore raw
Quoted 13 lines · Jens Axboe
Quoted 5 lines · Tim Hansen

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.

Related to patch 9987695 that removed similar checks in bio-integrity.

Applied, but ditto on the line length. Additionally, I killed that reference to "patch 9987695", I don't know what that means? What does that refer to?

Signature · 1 line
Jens Axboe

The patch number I referenced is what is used on patchwork.com to reference a patch under review. I'll leave that out in the next message. What is the proper manner of referencing another patch thats still in review?