mm: include/linux/mm.h page_mapping() bug of swapcache case
PATCH 1/1 mm: include/linux/mm.h page_mapping() bug of swapcache case
I run linux swap less and xwindows become not respond sometime. The bug is share swapper_space over all mappings of memory. Also the dmesg show several lines which is hidden before. Test of 3.0.51 fail near the end of kernel compilation. I run 3.0.50 successly a hours.
*** linux-3.0.50.a/include/linux/mm.h 2012-10-31 20:51:59.000000000 +0400
--- linux-3.0.50.b/include/linux/mm.h 2012-11-17 19:44:56.864762720 +0400
***************
*** 787,793 ****
struct address_space *mapping = page->mapping;
VM_BUG_ON(PageSlab(page));
! if (unlikely(PageSwapCache(page)))
mapping = &swapper_space;
else if ((unsigned long)mapping & PAGE_MAPPING_ANON)
mapping = NULL;
--- 787,793 ----
struct address_space *mapping = page->mapping;
VM_BUG_ON(PageSlab(page));
! if (likely(PageSwapCache(page)))
mapping = &swapper_space;
else if ((unsigned long)mapping & PAGE_MAPPING_ANON)
mapping = NULL;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>