Commit cc6a392a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] cleanup page_swap_cache

Removes some redundant BUG checks - trueness of PageSwapCache() implies
that page->mapping is non-NULL, and we've already checked that.
parent aa78091f
......@@ -103,8 +103,6 @@ static void __free_pages_ok (struct page *page, unsigned int order)
BUG();
if (!VALID_PAGE(page))
BUG();
if (PageSwapCache(page))
BUG();
if (PageLocked(page))
BUG();
if (PageLRU(page))
......@@ -297,8 +295,6 @@ static struct page * balance_classzone(zone_t * classzone, unsigned int gfp_mask
BUG();
if (!VALID_PAGE(page))
BUG();
if (PageSwapCache(page))
BUG();
if (PageLocked(page))
BUG();
if (PageLRU(page))
......
......@@ -96,8 +96,6 @@ void rw_swap_page(int rw, struct page *page)
PAGE_BUG(page);
if (!PageSwapCache(page))
PAGE_BUG(page);
if (page->mapping != &swapper_space)
PAGE_BUG(page);
if (!rw_swap_page_base(rw, entry, page))
unlock_page(page);
}
......@@ -113,8 +111,6 @@ void rw_swap_page_nolock(int rw, swp_entry_t entry, char *buf)
if (!PageLocked(page))
PAGE_BUG(page);
if (PageSwapCache(page))
PAGE_BUG(page);
if (page->mapping)
PAGE_BUG(page);
/* needs sync_page to wait I/O completation */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment