diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-10-31 08:36:11 -0800 | 
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-10-31 08:36:11 -0800 | 
| commit | 53b2ec5518aa2623e8c0cb36f1c304a797988a46 (patch) | |
| tree | 465d8631ade6c2fcbd7576ff9813d00116c6a1e8 /mm/vmscan.c | |
| parent | 0753ca7bc2b876dd136e9db11a20f85cbe4e08b1 (diff) | |
| parent | 581c1b14394aee60aff46ea67d05483261ed6527 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'mm/vmscan.c')
| -rw-r--r-- | mm/vmscan.c | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 64f9570cff5..135bf8ca96e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -70,7 +70,7 @@ struct scan_control {  	unsigned int priority;  	/* This context's GFP mask */ -	unsigned int gfp_mask; +	gfp_t gfp_mask;  	int may_writepage; @@ -186,7 +186,7 @@ EXPORT_SYMBOL(remove_shrinker);   *   * Returns the number of slab objects which we shrunk.   */ -static int shrink_slab(unsigned long scanned, unsigned int gfp_mask, +static int shrink_slab(unsigned long scanned, gfp_t gfp_mask,  			unsigned long lru_pages)  {  	struct shrinker *shrinker; @@ -417,7 +417,9 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)  		 * Anonymous process memory has backing store?  		 * Try to allocate it some swap space here.  		 */ -		if (PageAnon(page) && !PageSwapCache(page) && sc->may_swap) { +		if (PageAnon(page) && !PageSwapCache(page)) { +			if (!sc->may_swap) +				goto keep_locked;  			if (!add_to_swap(page))  				goto activate_locked;  		} @@ -519,7 +521,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)  #ifdef CONFIG_SWAP  		if (PageSwapCache(page)) { -			swp_entry_t swap = { .val = page->private }; +			swp_entry_t swap = { .val = page_private(page) };  			__delete_from_swap_cache(page);  			write_unlock_irq(&mapping->tree_lock);  			swap_free(swap); @@ -926,7 +928,7 @@ shrink_caches(struct zone **zones, struct scan_control *sc)   * holds filesystem locks which prevent writeout this might not work, and the   * allocation attempt will fail.   */ -int try_to_free_pages(struct zone **zones, unsigned int gfp_mask) +int try_to_free_pages(struct zone **zones, gfp_t gfp_mask)  {  	int priority;  	int ret = 0; @@ -1338,7 +1340,7 @@ module_init(kswapd_init)  /*   * Try to free up some pages from this zone through reclaim.   */ -int zone_reclaim(struct zone *zone, unsigned int gfp_mask, unsigned int order) +int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)  {  	struct scan_control sc;  	int nr_pages = 1 << order;  | 
