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

Commit 80976804 authored by Seth Jennings's avatar Seth Jennings Committed by Linus Torvalds
Browse files

staging: zcache: fix cleancache crash



After commit c5f5c4db ("staging: zcache: fix crash on high memory
swap") cleancache crashes on the first successful get.  This was caused
by a remaining virt_to_page() call in zcache_pampd_get_data_and_free()
that only gets run in the cleancache path.

The patch converts the virt_to_page() to struct page casting like was
done for other instances in c5f5c4db.

Signed-off-by: default avatarSeth Jennings <sjenning@linux.vnet.ibm.com>
Tested-By: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: default avatarDan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2838888f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1242,7 +1242,7 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *bufsize, bool raw,
	int ret = 0;

	BUG_ON(!is_ephemeral(pool));
	zbud_decompress(virt_to_page(data), pampd);
	zbud_decompress((struct page *)(data), pampd);
	zbud_free_and_delist((struct zbud_hdr *)pampd);
	atomic_dec(&zcache_curr_eph_pampd_count);
	return ret;