diff options
-rw-r--r-- | include/linux/swap.h | 5 | ||||
-rw-r--r-- | mm/shmem.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index b8b0c4ce83e6..62d81435347a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -382,6 +382,11 @@ static inline struct page *swapin_readahead(swp_entry_t swp, gfp_t gfp_mask, | |||
382 | return NULL; | 382 | return NULL; |
383 | } | 383 | } |
384 | 384 | ||
385 | static inline int swap_writepage(struct page *p, struct writeback_control *wbc) | ||
386 | { | ||
387 | return 0; | ||
388 | } | ||
389 | |||
385 | static inline struct page *lookup_swap_cache(swp_entry_t swp) | 390 | static inline struct page *lookup_swap_cache(swp_entry_t swp) |
386 | { | 391 | { |
387 | return NULL; | 392 | return NULL; |
diff --git a/mm/shmem.c b/mm/shmem.c index 7ec78e24a30d..d94d2e9146bc 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1068,8 +1068,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc) | |||
1068 | swap_duplicate(swap); | 1068 | swap_duplicate(swap); |
1069 | BUG_ON(page_mapped(page)); | 1069 | BUG_ON(page_mapped(page)); |
1070 | page_cache_release(page); /* pagecache ref */ | 1070 | page_cache_release(page); /* pagecache ref */ |
1071 | set_page_dirty(page); | 1071 | swap_writepage(page, wbc); |
1072 | unlock_page(page); | ||
1073 | if (inode) { | 1072 | if (inode) { |
1074 | mutex_lock(&shmem_swaplist_mutex); | 1073 | mutex_lock(&shmem_swaplist_mutex); |
1075 | /* move instead of add in case we're racing */ | 1074 | /* move instead of add in case we're racing */ |