Weijie Yang 0ab0abcf51 mm/zswap: refactor the get/put routines
The refcount routine was not fit the kernel get/put semantic exactly,
There were too many judgement statements on refcount and it could be
minus.

This patch does the following:

 - move refcount judgement to zswap_entry_put() to hide resource free function.

 - add a new function zswap_entry_find_get(), so that callers can use
   easily in the following pattern:

     zswap_entry_find_get
     .../* do something */
     zswap_entry_put

 - to eliminate compile error, move some functions declaration

This patch is based on Minchan Kim <minchan@kernel.org> 's idea and suggestion.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Cc: Seth Jennings <sjennings@variantweb.net>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13 12:09:11 +09:00
..
2012-01-03 22:54:56 -05:00
2011-07-26 16:49:47 -07:00
2013-09-10 18:56:30 -04:00
2013-11-13 12:09:06 +09:00
2013-11-01 08:24:41 +01:00
2013-06-28 14:34:33 +02:00
2013-10-16 21:35:53 -07:00
2010-05-21 18:31:21 -04:00
2013-07-10 18:11:34 -07:00
2013-07-30 11:53:12 -04:00
2012-06-20 14:39:36 -07:00
2013-09-12 15:38:02 -07:00
2013-09-11 15:57:31 -07:00