Blob Blame History Raw
From: Christoph Hellwig <hch@lst.de>
Date: Thu, 9 Dec 2021 07:31:24 +0100
Subject: [PATCH] block: remove the NULL ioc check in put_io_context
Git-commit: 8a20c0c7e0cea7eb0c32fd6b63ff514c9ac32b8f
Patch-mainline: v5.17-rc1
References: jsc#PED-1183

No caller passes in a NULL pointer, so remove the check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211209063131.18537-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Hannes Reinecke <hare@suse.com>
---
 block/blk-ioc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 0380e33930e3..04f3d2b0ca7d 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -155,9 +155,6 @@ void put_io_context(struct io_context *ioc)
 	unsigned long flags;
 	bool free_ioc = false;
 
-	if (ioc == NULL)
-		return;
-
 	BUG_ON(atomic_long_read(&ioc->refcount) <= 0);
 
 	/*
-- 
2.35.3