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

Commit 1cd970c9 authored by Vinayak Menon's avatar Vinayak Menon
Browse files

mm: zcache: reduce prints on store error



zcache store can fail on lowmemory conditions.
Do not throw unnecessary prints on such events, causing
a stall.

Change-Id: I8fba6938f75ef5b6054ee079951b7409279e1c02
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 6aef0fcd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ static u64 zcache_reclaim_fail;
static u64 zcache_pool_shrink;
static u64 zcache_pool_shrink_fail;
static u64 zcache_pool_shrink_pages;
static u64 zcache_store_failed;
static atomic_t zcache_stored_pages = ATOMIC_INIT(0);
static atomic_t zcache_stored_zero_pages = ATOMIC_INIT(0);

@@ -699,7 +700,7 @@ zero:
	/* store zcache handle */
	ret = zcache_store_zaddr(zpool, index, key.u.ino, zaddr);
	if (ret) {
		pr_err("%s: store handle error %d\n", __func__, ret);
		zcache_store_failed++;
		if (!zero)
			zbud_free(zpool->pool, zaddr);
	}
@@ -1088,6 +1089,8 @@ static int __init zcache_debugfs_init(void)
			zcache_debugfs_root, &zcache_pool_shrink_fail);
	debugfs_create_u64("pool_shrink_pages", S_IRUGO,
			zcache_debugfs_root, &zcache_pool_shrink_pages);
	debugfs_create_u64("store_fail", S_IRUGO,
			zcache_debugfs_root, &zcache_store_failed);
	return 0;
}