]> Pileus Git - ~andy/linux/commit
mm: frontswap: split out __frontswap_unuse_pages
authorSasha Levin <levinsasha928@gmail.com>
Sun, 10 Jun 2012 10:51:02 +0000 (12:51 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 11 Jun 2012 19:30:57 +0000 (15:30 -0400)
commitf116695a500cdd84cbeac68bc373e98ae729c24b
treee0af3b569d8b50a1a03612a57fec02f9846e1deb
parent96253444dbd90c6e9e9cfcb25315da5c412b058a
mm: frontswap: split out __frontswap_unuse_pages

An attempt at making frontswap_shrink shorter and more readable. This patch
splits out walking through the swap list to find an entry with enough
pages to unuse.

Also, assert that the internal __frontswap_unuse_pages is called under swap
lock, since that part of code was previously directly happen inside the lock.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
mm/frontswap.c