fs: inode: don't use movable allocations
Krishna Reddy [Tue, 23 Sep 2014 22:15:05 +0000 (15:15 -0700)]
Movable allocation requests can get CMA memory.
CMA memory is mapped as non-cached normal memory.
f2fs code can perform test_bit operations on the memory
allocated, which inturn uses ldr/str exclusive instuctions
on ARM. ldr/str exclusive instructions casue unhandled
exceptions and kernel panics.

[ 6934.858377] Unhandled fault: unknown 53 (0x96000035) at 0xffffffc0699c1000
[ 6934.866608] Internal error: : 96000035 [#1] PREEMPT SMP
[ 6934.871883] CPU: 1 PID: 666 Comm: LazyTaskWriterT Tainted: G        W    3.10.40-g3bdd559-dirty #39
[ 6934.880975] task: ffffffc06079a040 ti: ffffffc02a7bc000 task.ti: ffffffc02a7bc000
[ 6934.888565] PC is at test_and_clear_bit+0x14/0x40
[ 6934.893304] LR is at f2fs_delete_entry+0xd8/0x28c

Bug 1550455

Change-Id: I9645296a052301820063b9737bf06c8c9e059986
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/533926
(cherry picked from commit 2bae286b8f91c06f384749120596532af9da04ad)
Reviewed-on: http://git-master/r/592900
GVS: Gerrit_Virtual_Submit

fs/buffer.c
fs/inode.c

index 75964d7..25cd383 100644 (file)
@@ -975,7 +975,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
        int ret = 0;            /* Will call free_more_memory() */
 
        page = find_or_create_page(inode->i_mapping, index,
-               (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE);
+               (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS));
        if (!page)
                return ret;
 
index 00d5fc3..0e7953d 100644 (file)
@@ -164,7 +164,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
        mapping->a_ops = &empty_aops;
        mapping->host = inode;
        mapping->flags = 0;
-       mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
+       mapping_set_gfp_mask(mapping, GFP_HIGHUSER);
        mapping->private_data = NULL;
        mapping->backing_dev_info = &default_backing_dev_info;
        mapping->writeback_index = 0;