ARM: sunxi_defconfig: enable CONFIG_REGULATOR
[cascardo/linux.git] / mm / shmem.c
index 469f90d..cd6fc75 100644 (file)
@@ -2995,7 +2995,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
 #endif
 
        spin_lock_init(&sbinfo->stat_lock);
-       if (percpu_counter_init(&sbinfo->used_blocks, 0))
+       if (percpu_counter_init(&sbinfo->used_blocks, 0, GFP_KERNEL))
                goto failed;
        sbinfo->free_inodes = sbinfo->max_inodes;
 
@@ -3077,7 +3077,9 @@ static const struct address_space_operations shmem_aops = {
        .write_begin    = shmem_write_begin,
        .write_end      = shmem_write_end,
 #endif
+#ifdef CONFIG_MIGRATION
        .migratepage    = migrate_page,
+#endif
        .error_remove_page = generic_error_remove_page,
 };