diff options
author | Weijie Yang <weijie.yang@samsung.com> | 2013-11-12 15:08:27 -0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:47:20 +0900 |
commit | 72218ea0bcac05261f5ac6c4663774cf2351e2d4 (patch) | |
tree | cde35e438c0a6fa601d90e6399e1b8cc21963aa1 /mm/dmapool.c | |
parent | 093ffd8aea13fb21cd2ca41c2cb8e588499c8b65 (diff) | |
download | linux-3.10-72218ea0bcac05261f5ac6c4663774cf2351e2d4.tar.gz linux-3.10-72218ea0bcac05261f5ac6c4663774cf2351e2d4.tar.bz2 linux-3.10-72218ea0bcac05261f5ac6c4663774cf2351e2d4.zip |
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.
Change-Id: I8510ffe4f49a1a5f00b53be89b2ee33854464db8
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>
Diffstat (limited to 'mm/dmapool.c')
0 files changed, 0 insertions, 0 deletions