]> git.baikalelectronics.ru Git - kernel.git/commit
swap_info: SWAP_HAS_CACHE cleanups
authorHugh Dickins <hugh.dickins@tiscali.co.uk>
Tue, 15 Dec 2009 01:58:44 +0000 (17:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:15 +0000 (08:53 -0800)
commitb48d187445ffd54e2aa13abeeeb6122217861ca7
tree57c448fad45820c0eb984297fbef120b689381a0
parent88d1d53cd7bbd4f09c1c34da0dda6cb20e275792
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>
include/linux/swap.h
mm/swapfile.c