Revert "mm: swap: Add null pointer check"

This reverts commit 297bbec9ef.

Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
UtsavBalar1231 2022-04-26 21:21:04 +05:30 committed by spakkkk
parent d9bcf2b4af
commit 685e7ddb9a

View File

@ -282,7 +282,7 @@ int free_swap_slot(swp_entry_t entry)
si = swp_swap_info(entry);
cache = raw_cpu_ptr(&swp_slots);
if ((si && !(si->flags & SWP_SYNCHRONOUS_IO)) &&
if (!(si->flags & SWP_SYNCHRONOUS_IO) &&
use_swap_slot_cache && cache->slots_ret) {
spin_lock_irq(&cache->free_lock);
/* Swap slots cache may be deactivated before acquiring lock */