Re: [PATCH 3/3] mm/swap: remove redundant check for swap_slot_cache_initialized

2020-05-01 Thread Tim Chen
On 4/29/20 11:11 PM, Zhen Lei wrote: > Because enable_swap_slots_cache can only become true in > enable_swap_slots_cache(), and depends on swap_slot_cache_initialized is > true before. That means, when enable_swap_slots_cache is true, > swap_slot_cache_initialized is true also. > > So the condi

[PATCH 3/3] mm/swap: remove redundant check for swap_slot_cache_initialized

2020-04-29 Thread Zhen Lei
Because enable_swap_slots_cache can only become true in enable_swap_slots_cache(), and depends on swap_slot_cache_initialized is true before. That means, when enable_swap_slots_cache is true, swap_slot_cache_initialized is true also. So the condition: "swap_slot_cache_enabled && swap_slot_cache_in