diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 39ff14403d13..3db4a26adc44 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -360,16 +360,19 @@ void invalidate_bdev(struct block_device *bdev) | |||
360 | */ | 360 | */ |
361 | static void free_more_memory(void) | 361 | static void free_more_memory(void) |
362 | { | 362 | { |
363 | struct zone **zones; | 363 | struct zone *zone; |
364 | pg_data_t *pgdat; | 364 | int nid; |
365 | 365 | ||
366 | wakeup_pdflush(1024); | 366 | wakeup_pdflush(1024); |
367 | yield(); | 367 | yield(); |
368 | 368 | ||
369 | for_each_online_pgdat(pgdat) { | 369 | for_each_online_node(nid) { |
370 | zones = pgdat->node_zonelists[gfp_zone(GFP_NOFS)].zones; | 370 | (void)first_zones_zonelist(node_zonelist(nid, GFP_NOFS), |
371 | if (*zones) | 371 | gfp_zone(GFP_NOFS), NULL, |
372 | try_to_free_pages(zones, 0, GFP_NOFS); | 372 | &zone); |
373 | if (zone) | ||
374 | try_to_free_pages(node_zonelist(nid, GFP_NOFS), 0, | ||
375 | GFP_NOFS); | ||
373 | } | 376 | } |
374 | } | 377 | } |
375 | 378 | ||
@@ -2243,6 +2246,8 @@ int cont_expand_zero(struct file *file, struct address_space *mapping, | |||
2243 | goto out; | 2246 | goto out; |
2244 | BUG_ON(err != len); | 2247 | BUG_ON(err != len); |
2245 | err = 0; | 2248 | err = 0; |
2249 | |||
2250 | balance_dirty_pages_ratelimited(mapping); | ||
2246 | } | 2251 | } |
2247 | 2252 | ||
2248 | /* page covers the boundary, find the boundary offset */ | 2253 | /* page covers the boundary, find the boundary offset */ |
@@ -3180,8 +3185,7 @@ static void recalc_bh_state(void) | |||
3180 | 3185 | ||
3181 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags) | 3186 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags) |
3182 | { | 3187 | { |
3183 | struct buffer_head *ret = kmem_cache_alloc(bh_cachep, | 3188 | struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags); |
3184 | set_migrateflags(gfp_flags, __GFP_RECLAIMABLE)); | ||
3185 | if (ret) { | 3189 | if (ret) { |
3186 | INIT_LIST_HEAD(&ret->b_assoc_buffers); | 3190 | INIT_LIST_HEAD(&ret->b_assoc_buffers); |
3187 | get_cpu_var(bh_accounting).nr++; | 3191 | get_cpu_var(bh_accounting).nr++; |