blk: delete the redundant NULL judgment in put_io_context()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 block/blk-ioc.c | 3 ---
 1 file changed, 3 deletions(-)

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);
 
     /*
-- 
1.8.3.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux