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

Commit 3451aea9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: vmscan: lock page on swap error in pageout"

parents 59fd171f 81332eca
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -507,9 +507,19 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
		if (!PageWriteback(page)) {
			/* synchronous write or broken a_ops? */
			ClearPageReclaim(page);
			if (PageError(page))
			if (PageError(page) && PageSwapCache(page)) {
				ClearPageError(page);
				/*
				 * We lock the page here because it is required
				 * to free the swp space later in
				 * shrink_page_list. But the page may be
				 * unclocked by functions like
				 * handle_write_error.
				 */
				__set_page_locked(page);
				return PAGE_ACTIVATE;
			}
		}
		trace_mm_vmscan_writepage(page, trace_reclaim_flags(page));
		inc_zone_page_state(page, NR_VMSCAN_WRITE);
		return PAGE_SUCCESS;