Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126255
b: refs/heads/master
c: 67d58ac
h: refs/heads/master
i:
  126253: cd4a4df
  126251: b55b87b
  126247: bb31aab
  126239: f570141
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jan 6, 2009
1 parent cdb36a5 commit c745e69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 856bf4d717feb8c55d4e2f817b71ebb70cfbc67b
refs/heads/master: 67d58ac47d25f7e2a105248a4aea6113131ab874
11 changes: 9 additions & 2 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,14 @@ struct page *find_or_create_page(struct address_space *mapping,
page = __page_cache_alloc(gfp_mask);
if (!page)
return NULL;
err = add_to_page_cache_lru(page, mapping, index, gfp_mask);
/*
* We want a regular kernel memory (not highmem or DMA etc)
* allocation for the radix tree nodes, but we need to honour
* the context-specific requirements the caller has asked for.
* GFP_RECLAIM_MASK collects those requirements.
*/
err = add_to_page_cache_lru(page, mapping, index,
(gfp_mask & GFP_RECLAIM_MASK));
if (unlikely(err)) {
page_cache_release(page);
page = NULL;
Expand Down Expand Up @@ -950,7 +957,7 @@ grab_cache_page_nowait(struct address_space *mapping, pgoff_t index)
return NULL;
}
page = __page_cache_alloc(mapping_gfp_mask(mapping) & ~__GFP_FS);
if (page && add_to_page_cache_lru(page, mapping, index, GFP_KERNEL)) {
if (page && add_to_page_cache_lru(page, mapping, index, GFP_NOFS)) {
page_cache_release(page);
page = NULL;
}
Expand Down

0 comments on commit c745e69

Please sign in to comment.