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

Commit b99ea11c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: zcache: disallow sleep in zcache store"

parents a2f1039c 8028892c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ static u64 zcache_inactive_pages_refused;
static u64 zcache_reclaim_fail;
static atomic_t zcache_stored_pages = ATOMIC_INIT(0);

#define GFP_ZCACHE \
	(__GFP_FS | __GFP_NORETRY | __GFP_NOWARN | __GFP_NOMEMALLOC)
/*
 * Zcache receives pages for compression through the Cleancache API and is able
 * to evict pages from its own compressed pool on an LRU basis in the case that
@@ -406,7 +408,8 @@ static int zcache_store_zaddr(struct zcache_pool *zpool,
	rbnode = zcache_find_get_rbnode(zpool, zhandle->rb_index);
	if (!rbnode) {
		/* alloc and init a new rbnode */
		rbnode = kmem_cache_alloc(zcache_rbnode_cache, GFP_KERNEL);
		rbnode = kmem_cache_alloc(zcache_rbnode_cache,
			GFP_ZCACHE);
		if (!rbnode)
			return -ENOMEM;

@@ -535,7 +538,7 @@ static void zcache_store_page(int pool_id, struct cleancache_filekey key,

	/* store zcache handle together with compressed page data */
	ret = zbud_alloc(zpool->pool, zlen + sizeof(struct zcache_ra_handle),
			__GFP_NORETRY | __GFP_NOWARN, &zaddr);
			GFP_ZCACHE, &zaddr);
	if (ret) {
		zcache_zbud_alloc_fail++;
		put_cpu_var(zcache_dstmem);