add patch move-error-report-out-of-atomic-context
[ext4-patch-queue.git] / use-non-moveable-memory-for-the-jbd-superblock
blob8200977772481bba408151b0cbd0113793988e08
1 jbd/jbd2: use non-movable memory for the jbd superblock
3 From: Gioh Kim <gioh.kim@lge.com>
5 Sicne the jbd/jbd2 superblock is not released until the file system is
6 unmounted, allocate the buffer cache from the non-moveable area to
7 allow page migration and CMA allocations to more easily succeed.
9 Signed-off-by: Gioh Kim <gioh.kim@lge.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 Reviewed-by: Jan Kara <jack@suse.cz>
12 ---
13  fs/jbd/journal.c  |    2 +-
14  fs/jbd2/journal.c |    2 +-
15  2 files changed, 2 insertions(+), 2 deletions(-)
17 diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
18 index 06fe11e..aab8549 100644
19 --- a/fs/jbd/journal.c
20 +++ b/fs/jbd/journal.c
21 @@ -886,7 +886,7 @@ journal_t * journal_init_inode (struct inode *inode)
22                 goto out_err;
23         }
25 -       bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
26 +       bh = getblk_unmovable(journal->j_dev, blocknr, journal->j_blocksize);
27         if (!bh) {
28                 printk(KERN_ERR
29                        "%s: Cannot get buffer for journal superblock\n",
30 diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
31 index 67b8e30..65bd3b1 100644
32 --- a/fs/jbd2/journal.c
33 +++ b/fs/jbd2/journal.c
34 @@ -1237,7 +1237,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
35                 goto out_err;
36         }
38 -       bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
39 +       bh = getblk_unmovable(journal->j_dev, blocknr, journal->j_blocksize);
40         if (!bh) {
41                 printk(KERN_ERR
42                        "%s: Cannot get buffer for journal superblock\n",
43 -- 
44 1.7.9.5
47 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
48 the body of a message to majordomo@vger.kernel.org
49 More majordomo info at  http://vger.kernel.org/majordomo-info.html
50 Please read the FAQ at  http://www.tux.org/lkml/