projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[firefly-linux-kernel-4.4.55.git]
/
mm
/
swap_state.c
diff --git
a/mm/swap_state.c
b/mm/swap_state.c
index 7b09ac503fec9dde77422705a08b2a1f087d0d70..e0e1583f32c26cc2579554a4abcc797a9a671553 100644
(file)
--- a/
mm/swap_state.c
+++ b/
mm/swap_state.c
@@
-15,6
+15,7
@@
#include <linux/buffer_head.h>
#include <linux/backing-dev.h>
#include <linux/pagevec.h>
#include <linux/buffer_head.h>
#include <linux/backing-dev.h>
#include <linux/pagevec.h>
+#include <linux/migrate.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
@@
-27,6
+28,7
@@
static struct address_space_operations swap_aops = {
.writepage = swap_writepage,
.sync_page = block_sync_page,
.set_page_dirty = __set_page_dirty_nobuffers,
.writepage = swap_writepage,
.sync_page = block_sync_page,
.set_page_dirty = __set_page_dirty_nobuffers,
+ .migratepage = migrate_page,
};
static struct backing_dev_info swap_backing_dev_info = {
};
static struct backing_dev_info swap_backing_dev_info = {
@@
-146,8
+148,7
@@
int add_to_swap(struct page * page, gfp_t gfp_mask)
swp_entry_t entry;
int err;
swp_entry_t entry;
int err;
- if (!PageLocked(page))
- BUG();
+ BUG_ON(!PageLocked(page));
for (;;) {
entry = get_swap_page();
for (;;) {
entry = get_swap_page();