|
@@ -1251,13 +1251,12 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *bufsize, bool raw,
|
|
void *pampd, struct tmem_pool *pool,
|
|
void *pampd, struct tmem_pool *pool,
|
|
struct tmem_oid *oid, uint32_t index)
|
|
struct tmem_oid *oid, uint32_t index)
|
|
{
|
|
{
|
|
- int ret = 0;
|
|
|
|
-
|
|
|
|
BUG_ON(!is_ephemeral(pool));
|
|
BUG_ON(!is_ephemeral(pool));
|
|
- zbud_decompress((struct page *)(data), pampd);
|
|
|
|
|
|
+ if (zbud_decompress((struct page *)(data), pampd) < 0)
|
|
|
|
+ return -EINVAL;
|
|
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 0;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|