aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/inode.c10
-rw-r--r--fs/ramfs/inode.c1
3 files changed, 10 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 424165b569f8..94344b2e0b46 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -982,7 +982,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
982 struct buffer_head *bh; 982 struct buffer_head *bh;
983 983
984 page = find_or_create_page(inode->i_mapping, index, 984 page = find_or_create_page(inode->i_mapping, index,
985 mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); 985 (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE);
986 if (!page) 986 if (!page)
987 return NULL; 987 return NULL;
988 988
diff --git a/fs/inode.c b/fs/inode.c
index 9a012cc5b6cd..47b87b071de3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -145,7 +145,7 @@ static struct inode *alloc_inode(struct super_block *sb)
145 mapping->a_ops = &empty_aops; 145 mapping->a_ops = &empty_aops;
146 mapping->host = inode; 146 mapping->host = inode;
147 mapping->flags = 0; 147 mapping->flags = 0;
148 mapping_set_gfp_mask(mapping, GFP_HIGHUSER); 148 mapping_set_gfp_mask(mapping, GFP_HIGHUSER_PAGECACHE);
149 mapping->assoc_mapping = NULL; 149 mapping->assoc_mapping = NULL;
150 mapping->backing_dev_info = &default_backing_dev_info; 150 mapping->backing_dev_info = &default_backing_dev_info;
151 151
@@ -519,7 +519,13 @@ repeat:
519 * new_inode - obtain an inode 519 * new_inode - obtain an inode
520 * @sb: superblock 520 * @sb: superblock
521 * 521 *
522 * Allocates a new inode for given superblock. 522 * Allocates a new inode for given superblock. The default gfp_mask
523 * for allocations related to inode->i_mapping is GFP_HIGHUSER_PAGECACHE.
524 * If HIGHMEM pages are unsuitable or it is known that pages allocated
525 * for the page cache are not reclaimable or migratable,
526 * mapping_set_gfp_mask() must be called with suitable flags on the
527 * newly created inode's mapping
528 *
523 */ 529 */
524struct inode *new_inode(struct super_block *sb) 530struct inode *new_inode(struct super_block *sb)
525{ 531{
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index d40d22b347b7..ef2b46d099ff 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -60,6 +60,7 @@ struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev)
60 inode->i_blocks = 0; 60 inode->i_blocks = 0;
61 inode->i_mapping->a_ops = &ramfs_aops; 61 inode->i_mapping->a_ops = &ramfs_aops;
62 inode->i_mapping->backing_dev_info = &ramfs_backing_dev_info; 62 inode->i_mapping->backing_dev_info = &ramfs_backing_dev_info;
63 mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER);
63 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 64 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
64 switch (mode & S_IFMT) { 65 switch (mode & S_IFMT) {
65 default: 66 default: