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

Commit 1c001ef2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm/page_io.c: do not free shared swap slots"

parents 00d10708 277451b3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ static void swap_slot_free_notify(struct page *page)
{
	struct swap_info_struct *sis;
	struct gendisk *disk;
	swp_entry_t entry;

	/*
	 * There is no guarantee that the page is in swap cache - the software
@@ -108,11 +109,11 @@ static void swap_slot_free_notify(struct page *page)
	 * we again wish to reclaim it.
	 */
	disk = sis->bdev->bd_disk;
	if (disk->fops->swap_slot_free_notify) {
		swp_entry_t entry;
	entry.val = page_private(page);
	if (disk->fops->swap_slot_free_notify &&
			__swap_count(sis, entry) == 1) {
		unsigned long offset;

		entry.val = page_private(page);
		offset = swp_offset(entry);

		SetPageDirty(page);