]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/mpage.c
mm, memcg: use consistent gfp flags during readahead
[mirror_ubuntu-artful-kernel.git] / fs / mpage.c
index eedc644b78d78338ebb960339f3d1d224b837b9b..c8a05901a37baa251f27698c740c824ad91df136 100644 (file)
@@ -71,6 +71,8 @@ mpage_alloc(struct block_device *bdev,
 {
        struct bio *bio;
 
+       /* Restrict the given (page cache) mask for slab allocations */
+       gfp_flags &= GFP_KERNEL;
        bio = bio_alloc(gfp_flags, nr_vecs);
 
        if (bio == NULL && (current->flags & PF_MEMALLOC)) {
@@ -362,7 +364,7 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
        sector_t last_block_in_bio = 0;
        struct buffer_head map_bh;
        unsigned long first_logical_block = 0;
-       gfp_t gfp = mapping_gfp_constraint(mapping, GFP_KERNEL);
+       gfp_t gfp = readahead_gfp_mask(mapping);
 
        map_bh.b_state = 0;
        map_bh.b_size = 0;