|
@@ -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,
|