diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-09-04 10:44:49 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:28:13 +0900 |
commit | 977df00d10b0276235ea5cc8492dae28a2c226fb (patch) | |
tree | a8262e9e44271c8454d3b69d62840d1c8a2a4836 /fs/jbd2 | |
parent | 2200fd6e2bc846aca49c394c421b0e08e15fe674 (diff) | |
download | linux-3.10-977df00d10b0276235ea5cc8492dae28a2c226fb.tar.gz linux-3.10-977df00d10b0276235ea5cc8492dae28a2c226fb.tar.bz2 linux-3.10-977df00d10b0276235ea5cc8492dae28a2c226fb.zip |
fs: jbd2: force commit to free jbd2's cma/isolated page
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/transaction.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index a6917125f21..9ef37f0c4d7 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1778,8 +1778,22 @@ int jbd2_journal_try_to_free_buffers(journal_t *journal, __journal_try_to_free_buffer(journal, bh); jbd2_journal_put_journal_head(jh); jbd_unlock_bh_state(bh); + +#ifndef CONFIG_CMA if (buffer_jbd(bh)) goto busy; +#else + if (buffer_jbd(bh)) { + unsigned mt = get_pageblock_migratetype(page); + /* + * Workaround: In case of CMA page, just commit journal. + */ + if (mt == MIGRATE_ISOLATE || mt == MIGRATE_CMA) + jbd2_journal_force_commit(journal); + else + goto busy; + } +#endif } while ((bh = bh->b_this_page) != head); ret = try_to_free_buffers(page); |