Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198220
b: refs/heads/master
c: e13861d
h: refs/heads/master
v: v3
  • Loading branch information
Minchan Kim authored and Linus Torvalds committed May 25, 2010
1 parent 6c15025 commit f8ab3f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b50dc26a0a25a9d1998d206e1f7d849aa78063f
refs/heads/master: e13861d822f8f443ca0c020ea8fc2dc01039cd63
4 changes: 2 additions & 2 deletions trunk/include/linux/migrate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ typedef struct page *new_page_t(struct page *, unsigned long private, int **);
#ifdef CONFIG_MIGRATION
#define PAGE_MIGRATION 1

extern int putback_lru_pages(struct list_head *l);
extern void putback_lru_pages(struct list_head *l);
extern int migrate_page(struct address_space *,
struct page *, struct page *);
extern int migrate_pages(struct list_head *l, new_page_t x,
Expand All @@ -25,7 +25,7 @@ extern int migrate_vmas(struct mm_struct *mm,
#else
#define PAGE_MIGRATION 0

static inline int putback_lru_pages(struct list_head *l) { return 0; }
static inline void putback_lru_pages(struct list_head *l) {}
static inline int migrate_pages(struct list_head *l, new_page_t x,
unsigned long private, int offlining) { return -ENOSYS; }

Expand Down
7 changes: 1 addition & 6 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,18 @@ int migrate_prep(void)
/*
* Add isolated pages on the list back to the LRU under page lock
* to avoid leaking evictable pages back onto unevictable list.
*
* returns the number of pages put back.
*/
int putback_lru_pages(struct list_head *l)
void putback_lru_pages(struct list_head *l)
{
struct page *page;
struct page *page2;
int count = 0;

list_for_each_entry_safe(page, page2, l, lru) {
list_del(&page->lru);
dec_zone_page_state(page, NR_ISOLATED_ANON +
page_is_file_cache(page));
putback_lru_page(page);
count++;
}
return count;
}

/*
Expand Down

0 comments on commit f8ab3f4

Please sign in to comment.