Thread (18 messages) 18 messages, 3 authors, 2021-12-16
STALE1670d LANDED: 9 (9M)

[PATCH 04/11] block: remove the NULL ioc check in put_io_context

From: Christoph Hellwig <hch@lst.de>
Date: 2021-12-09 06:31:42
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

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>
---
 block/blk-ioc.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 0380e33930e31..04f3d2b0ca7db 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.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help