1 ext4: use non-movable memory for the ext4 superblock
3 From: Gioh Kim <gioh.kim@lge.com>
5 Since the ext4 superblock is not released until the file system is
6 unmounted, allocate the buffer cache entry for the ext4 superblock out
7 of the non-moveable are to allow page migrations and thus CMA
8 allocations to more easily succeed if the CMA area is limited.
10 Signed-off-by: Gioh Kim <gioh.kim@lge.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 Reviewed-by: Jan Kara <jack@suse.cz>
14 fs/ext4/super.c | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
17 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
18 index 487c65b..4b81747 100644
21 @@ -3436,7 +3436,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
22 logical_sb_block = sb_block;
25 - if (!(bh = sb_bread(sb, logical_sb_block))) {
26 + if (!(bh = sb_bread_unmovable(sb, logical_sb_block))) {
27 ext4_msg(sb, KERN_ERR, "unable to read superblock");
30 @@ -3646,7 +3646,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
32 logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
33 offset = do_div(logical_sb_block, blocksize);
34 - bh = sb_bread(sb, logical_sb_block);
35 + bh = sb_bread_unmovable(sb, logical_sb_block);
37 ext4_msg(sb, KERN_ERR,
38 "Can't read superblock on 2nd try");
39 @@ -3868,7 +3868,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
41 for (i = 0; i < db_count; i++) {
42 block = descriptor_loc(sb, logical_sb_block, i);
43 - sbi->s_group_desc[i] = sb_bread(sb, block);
44 + sbi->s_group_desc[i] = sb_bread_unmovable(sb, block);
45 if (!sbi->s_group_desc[i]) {
46 ext4_msg(sb, KERN_ERR,
47 "can't read group descriptor %d", i);