diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2012-01-12 13:11:43 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-12 13:11:43 +0900 |
| commit | b1bdd255661369cb6eb90b6e181169b5e6d0f9b6 (patch) | |
| tree | 17d15f3a6dc5bdd6205070dbef0e339421b13d25 /mm/filemap.c | |
| parent | 9d14070f656addddce3d63fd483de46930b51850 (diff) | |
| parent | c1537b4863da620f12f5b42ece61bf65314148ed (diff) | |
Merge branch 'sh/nommu' into sh-latest
Diffstat (limited to 'mm/filemap.c')
| -rw-r--r-- | mm/filemap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index a0701e6eec10..c4ee2e918bea 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2351,8 +2351,11 @@ struct page *grab_cache_page_write_begin(struct address_space *mapping, pgoff_t index, unsigned flags) { int status; + gfp_t gfp_mask; struct page *page; gfp_t gfp_notmask = 0; + + gfp_mask = mapping_gfp_mask(mapping) | __GFP_WRITE; if (flags & AOP_FLAG_NOFS) gfp_notmask = __GFP_FS; repeat: @@ -2360,7 +2363,7 @@ repeat: if (page) goto found; - page = __page_cache_alloc(mapping_gfp_mask(mapping) & ~gfp_notmask); + page = __page_cache_alloc(gfp_mask & ~gfp_notmask); if (!page) return NULL; status = add_to_page_cache_lru(page, mapping, index, |
