staging: zcache: fix cleancache crash
After commitc5f5c4db39
("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 inc5f5c4db39
. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Tested-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2838888f3f
commit
80976804f5
|
@ -1242,7 +1242,7 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *bufsize, bool raw,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
BUG_ON(!is_ephemeral(pool));
|
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);
|
zbud_free_and_delist((struct zbud_hdr *)pampd);
|
||||||
atomic_dec(&zcache_curr_eph_pampd_count);
|
atomic_dec(&zcache_curr_eph_pampd_count);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue