From: Christoph Hellwig Date: Thu, 9 Dec 2021 06:31:24 +0000 (+0100) Subject: block: remove the NULL ioc check in put_io_context X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8a20c0c7e0cea7eb0c32fd6b63ff514c9ac32b8f;p=linux.git block: remove the NULL ioc check in put_io_context No caller passes in a NULL pointer, so remove the check. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20211209063131.18537-5-hch@lst.de Signed-off-by: Jens Axboe --- 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); /*