diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 131f2938f3ad..855b93b3637c 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -971,7 +971,7 @@ static inline int shmem_parse_mpol(char *value, int *policy, nodemask_t *policy_ | |||
971 | *nodelist++ = '\0'; | 971 | *nodelist++ = '\0'; |
972 | if (nodelist_parse(nodelist, *policy_nodes)) | 972 | if (nodelist_parse(nodelist, *policy_nodes)) |
973 | goto out; | 973 | goto out; |
974 | if (!nodes_subset(*policy_nodes, node_online_map)) | 974 | if (!nodes_subset(*policy_nodes, node_states[N_HIGH_MEMORY])) |
975 | goto out; | 975 | goto out; |
976 | } | 976 | } |
977 | if (!strcmp(value, "default")) { | 977 | if (!strcmp(value, "default")) { |
@@ -996,9 +996,11 @@ static inline int shmem_parse_mpol(char *value, int *policy, nodemask_t *policy_ | |||
996 | err = 0; | 996 | err = 0; |
997 | } else if (!strcmp(value, "interleave")) { | 997 | } else if (!strcmp(value, "interleave")) { |
998 | *policy = MPOL_INTERLEAVE; | 998 | *policy = MPOL_INTERLEAVE; |
999 | /* Default to nodes online if no nodelist */ | 999 | /* |
1000 | * Default to online nodes with memory if no nodelist | ||
1001 | */ | ||
1000 | if (!nodelist) | 1002 | if (!nodelist) |
1001 | *policy_nodes = node_online_map; | 1003 | *policy_nodes = node_states[N_HIGH_MEMORY]; |
1002 | err = 0; | 1004 | err = 0; |
1003 | } | 1005 | } |
1004 | out: | 1006 | out: |
@@ -1060,7 +1062,8 @@ shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info, | |||
1060 | return page; | 1062 | return page; |
1061 | } | 1063 | } |
1062 | #else | 1064 | #else |
1063 | static inline int shmem_parse_mpol(char *value, int *policy, nodemask_t *policy_nodes) | 1065 | static inline int shmem_parse_mpol(char *value, int *policy, |
1066 | nodemask_t *policy_nodes) | ||
1064 | { | 1067 | { |
1065 | return 1; | 1068 | return 1; |
1066 | } | 1069 | } |
@@ -2238,7 +2241,7 @@ static int shmem_fill_super(struct super_block *sb, | |||
2238 | unsigned long blocks = 0; | 2241 | unsigned long blocks = 0; |
2239 | unsigned long inodes = 0; | 2242 | unsigned long inodes = 0; |
2240 | int policy = MPOL_DEFAULT; | 2243 | int policy = MPOL_DEFAULT; |
2241 | nodemask_t policy_nodes = node_online_map; | 2244 | nodemask_t policy_nodes = node_states[N_HIGH_MEMORY]; |
2242 | 2245 | ||
2243 | #ifdef CONFIG_TMPFS | 2246 | #ifdef CONFIG_TMPFS |
2244 | /* | 2247 | /* |