[PATCH] swap: warn when a swap area overflows the maximum size

Raymond Jennings
2013-07-07T11:44:17Z

+ if (maxpages < swap_header->info.last_page) {
+ printk(KERN_WARNING
+ "Truncating oversized swap area, only using %luk out of %luk
\n",
+ maxpages << (PAGE_SHIFT - 10),
+ swap_header->info.last_page << (PAGE_SHIFT - 10));