From: Heesub Shin Date: Sat, 13 Dec 2014 00:57:21 +0000 (-0800) Subject: mm/zbud: init user ops only when it is needed X-Git-Tag: omap-for-v3.20/drop-legacy-3517~97^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dd61aa31cb5a64fe294c32424d9602fdb7317b0;p=pandora-kernel.git mm/zbud: init user ops only when it is needed When zbud is initialized through the zpool wrapper, pool->ops which points to user-defined operations is always set regardless of whether it is specified from the upper layer. This causes zbud_reclaim_page() to iterate its loop for evicting pool pages out without any gain. This patch sets the user-defined ops only when it is needed, so that zbud_reclaim_page() can bail out the reclamation loop earlier if there is no user-defined operations specified. Signed-off-by: Heesub Shin Acked-by: Dan Streetman Cc: Seth Jennings Cc: Sunae Seo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed