mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
swap_info: SWAP_HAS_CACHE cleanups
Though swap_count() is useful, I'm finding that swap_has_cache() and encode_swapmap() obscure what happens in the swap_map entry, just at those points where I need to understand it. Remove them, and pass more usable "usage" values to scan_swap_map(), swap_entry_free() and __swap_duplicate(), instead of the SWAP_MAP and SWAP_CACHE enum. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
73c34b6acc
commit
253d553ba7
2 changed files with 65 additions and 92 deletions
|
|
@ -154,7 +154,7 @@ enum {
|
|||
#define SWAP_MAP_MAX 0x7ffe
|
||||
#define SWAP_MAP_BAD 0x7fff
|
||||
#define SWAP_HAS_CACHE 0x8000 /* There is a swap cache of entry. */
|
||||
#define SWAP_COUNT_MASK (~SWAP_HAS_CACHE)
|
||||
|
||||
/*
|
||||
* The in-memory structure used to track swap areas.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue