aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/zcache/zcache-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/zcache/zcache-main.c')
-rw-r--r--drivers/staging/zcache/zcache-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
index 1994cab6edf..f3de76d0707 100644
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@ -374,6 +374,7 @@ static void *zcache_pampd_eph_create(char *data, size_t size, bool raw,
if (page_is_zero_filled(page)) {
clen = 0;
zero_filled = true;
+ inc_zcache_zero_filled_pages();
goto got_pampd;
}
@@ -440,6 +441,7 @@ static void *zcache_pampd_pers_create(char *data, size_t size, bool raw,
if (page_is_zero_filled(page)) {
clen = 0;
zero_filled = true;
+ inc_zcache_zero_filled_pages();
goto got_pampd;
}
@@ -652,6 +654,7 @@ static int zcache_pampd_get_data_and_free(char *data, size_t *sizep, bool raw,
zpages = 1;
if (!raw)
*sizep = PAGE_SIZE;
+ dec_zcache_zero_filled_pages();
goto zero_fill;
}
@@ -702,6 +705,7 @@ static void zcache_pampd_free(void *pampd, struct tmem_pool *pool,
zero_filled = true;
zsize = 0;
zpages = 1;
+ dec_zcache_zero_filled_pages();
}
if (pampd_is_remote(pampd) && !zero_filled) {