diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 75575c392167..c1fc205a92c6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -123,6 +123,8 @@ void __remove_from_page_cache(struct page *page) | |||
123 | page->mapping = NULL; | 123 | page->mapping = NULL; |
124 | mapping->nrpages--; | 124 | mapping->nrpages--; |
125 | __dec_zone_page_state(page, NR_FILE_PAGES); | 125 | __dec_zone_page_state(page, NR_FILE_PAGES); |
126 | if (PageSwapBacked(page)) | ||
127 | __dec_zone_page_state(page, NR_SHMEM); | ||
126 | BUG_ON(page_mapped(page)); | 128 | BUG_ON(page_mapped(page)); |
127 | 129 | ||
128 | /* | 130 | /* |
@@ -435,6 +437,8 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, | |||
435 | if (likely(!error)) { | 437 | if (likely(!error)) { |
436 | mapping->nrpages++; | 438 | mapping->nrpages++; |
437 | __inc_zone_page_state(page, NR_FILE_PAGES); | 439 | __inc_zone_page_state(page, NR_FILE_PAGES); |
440 | if (PageSwapBacked(page)) | ||
441 | __inc_zone_page_state(page, NR_SHMEM); | ||
438 | spin_unlock_irq(&mapping->tree_lock); | 442 | spin_unlock_irq(&mapping->tree_lock); |
439 | } else { | 443 | } else { |
440 | page->mapping = NULL; | 444 | page->mapping = NULL; |