]> git.baikalelectronics.ru Git - kernel.git/commit
mm: cleanup "swapcache" in do_swap_page
authorHugh Dickins <hughd@google.com>
Sat, 23 Feb 2013 00:36:10 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:24 +0000 (17:50 -0800)
commita0e9d1626f26444f5a817ea025beff35b2f9b651
tree868442b02e6c83bdd52e4e129b17b90341190b6d
parentfe5d9a2d614a60996579ad67823f1cf1ef509515
mm: cleanup "swapcache" in do_swap_page

I dislike the way in which "swapcache" gets used in do_swap_page():
there is always a page from swapcache there (even if maybe uncached by
the time we lock it), but tests are made according to "swapcache".
Rework that with "page != swapcache", as has been done in unuse_pte().

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Petr Holasek <pholasek@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Izik Eidus <izik.eidus@ravellosystems.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c