Commit 80976804f501303a34a76e925119393722596dca

Authored by Seth Jennings
Committed by Linus Torvalds
1 parent 2838888f3f

staging: zcache: fix cleancache crash

After commit c5f5c4db3938 ("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 c5f5c4db3938.

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/staging/zcache/zcache-main.c
... ... @@ -1242,7 +1242,7 @@
1242 1242 int ret = 0;
1243 1243  
1244 1244 BUG_ON(!is_ephemeral(pool));
1245   - zbud_decompress(virt_to_page(data), pampd);
  1245 + zbud_decompress((struct page *)(data), pampd);
1246 1246 zbud_free_and_delist((struct zbud_hdr *)pampd);
1247 1247 atomic_dec(&zcache_curr_eph_pampd_count);
1248 1248 return ret;