blk: delete the redundant NULL judgment in put_io_context()
diff mbox series

Message ID 6b0b6924-e83b-4a66-2574-5a43a1761e2a@gmail.com
State New
Headers show
Series
  • blk: delete the redundant NULL judgment in put_io_context()
Related show

Commit Message

brookxu July 31, 2020, 2:18 a.m. UTC
The context of calling put_io_context() will determine whether the ioc
is NULL or the ioc is obtained from icq, which can ensure that the ioc
is not NULL, so the repeated judgment here may be redundant.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
 block/blk-ioc.c | 3 ---
 1 file changed, 3 deletions(-)

Patch
diff mbox series

diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 9df50fb..b34eae5 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -138,9 +138,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);
 
     /*