diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:14:34 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:14:34 -0700 |
| commit | f7a0fd56e4f58aec3300082fc10433052e2f1863 (patch) | |
| tree | 4b3348f4866f6b3417f456a298229d63d4581424 /fs/buffer.c | |
| parent | 5e1e704a7de14ae79dc4d983dbbcab67064960c9 (diff) | |
| parent | 31d141e3a666269a3b6fcccddb0351caf7454240 (diff) | |
Merge 3.12-rc6 into staging-next.
We want these fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 4d7433534f5c..6024877335ca 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1005,9 +1005,19 @@ grow_dev_page(struct block_device *bdev, sector_t block, struct buffer_head *bh; sector_t end_block; int ret = 0; /* Will call free_more_memory() */ + gfp_t gfp_mask; - page = find_or_create_page(inode->i_mapping, index, - (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE); + gfp_mask = mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS; + gfp_mask |= __GFP_MOVABLE; + /* + * XXX: __getblk_slow() can not really deal with failure and + * will endlessly loop on improvised global reclaim. Prefer + * looping in the allocator rather than here, at least that + * code knows what it's doing. + */ + gfp_mask |= __GFP_NOFAIL; + + page = find_or_create_page(inode->i_mapping, index, gfp_mask); if (!page) return ret; |
