diff options
Diffstat (limited to 'mm/swap_state.c')
-rw-r--r-- | mm/swap_state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c index 2405aba2f..87ecc0c10 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -73,6 +73,7 @@ static inline void remove_from_swap_cache(struct page *page) PAGE_BUG(page); PageClearSwapCache(page); + ClearPageDirty(page); remove_inode_page(page); } @@ -102,9 +103,10 @@ void delete_from_swap_cache_nolock(struct page *page) if (!PageLocked(page)) BUG(); - if (block_flushpage(page, 0)) - lru_cache_del(page); + if (page->buffers) + block_destroy_buffers(page); + lru_cache_del(page); __delete_from_swap_cache(page); page_cache_release(page); } |