Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16841
b: refs/heads/master
c: 1480a54
h: refs/heads/master
i:
  16839: 3253ff3
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jan 9, 2006
1 parent 0ea874b commit 6a09dde
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 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: 8419c3181086c86664e8246bc997afc2e4ffba4f
refs/heads/master: 1480a540c98525640174a7eadd712378fcd6fd63
2 changes: 1 addition & 1 deletion trunk/include/linux/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ extern int rw_swap_page_sync(int, swp_entry_t, struct page *);
extern struct address_space swapper_space;
#define total_swapcache_pages swapper_space.nrpages
extern void show_swap_cache_info(void);
extern int add_to_swap(struct page *);
extern int add_to_swap(struct page *, gfp_t);
extern void __delete_from_swap_cache(struct page *);
extern void delete_from_swap_cache(struct page *);
extern int move_to_swap_cache(struct page *, swp_entry_t);
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/swap_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void __delete_from_swap_cache(struct page *page)
* Allocate swap space for the page and add the page to the
* swap cache. Caller needs to hold the page lock.
*/
int add_to_swap(struct page * page)
int add_to_swap(struct page * page, gfp_t gfp_mask)
{
swp_entry_t entry;
int err;
Expand All @@ -166,7 +166,7 @@ int add_to_swap(struct page * page)
* Add it to the swap cache and mark it dirty
*/
err = __add_to_swap_cache(page, entry,
GFP_ATOMIC|__GFP_NOMEMALLOC|__GFP_NOWARN);
gfp_mask|__GFP_NOMEMALLOC|__GFP_NOWARN);

switch (err) {
case 0: /* Success */
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
* Try to allocate it some swap space here.
*/
if (PageAnon(page) && !PageSwapCache(page)) {
if (!add_to_swap(page))
if (!add_to_swap(page, GFP_ATOMIC))
goto activate_locked;
}
#endif /* CONFIG_SWAP */
Expand Down Expand Up @@ -715,7 +715,7 @@ int migrate_pages(struct list_head *l, struct list_head *t)
}

if (PageAnon(page) && !PageSwapCache(page)) {
if (!add_to_swap(page)) {
if (!add_to_swap(page, GFP_KERNEL)) {
unlock_page(page);
list_move(&page->lru, &failed);
nr_failed++;
Expand Down

0 comments on commit 6a09dde

Please sign in to comment.