diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index d79fd68ef..d24ff0e0a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -154,7 +154,7 @@ static inline int is_page_shared(struct page *page) return 1; count = page_count(page); if (PageSwapCache(page)) - count += swap_count(page) - 2; + count += swap_count(page) - 2 - !!page->buffers; return count > 1; } @@ -173,6 +173,8 @@ do { \ #define lru_cache_del(page) \ do { \ + if (!PageLocked(page)) \ + BUG(); \ spin_lock(&pagemap_lru_lock); \ list_del(&(page)->lru); \ nr_lru_pages--; \ |