Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41a65c88 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: swap: free up swap on mm reap"

parents 744976fa 22d01449
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -273,9 +273,12 @@ static int refill_swap_slots_cache(struct swap_slots_cache *cache)
int free_swap_slot(swp_entry_t entry)
{
	struct swap_slots_cache *cache;
	struct swap_info_struct *si;

	si = swp_swap_info(entry);
	cache = raw_cpu_ptr(&swp_slots);
	if (use_swap_slot_cache && cache->slots_ret) {
	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 */
		if (!use_swap_slot_cache || !cache->slots_ret) {