aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.com>2012-09-22 09:48:20 +0200
committercodeworkx <codeworkx@cyanogenmod.com>2012-09-22 14:02:16 +0200
commit2489007e7d740ccbc3e0a202914e243ad5178787 (patch)
treeb8e6380ea7b1da63474ad68a5dba997e01146043 /fs/jbd2
parent5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff)
downloadkernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/checkpoint.c3
-rw-r--r--fs/jbd2/transaction.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
index 2c62c5a..3a98cb0 100644
--- a/fs/jbd2/checkpoint.c
+++ b/fs/jbd2/checkpoint.c
@@ -543,8 +543,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal)
* correctness. Fortunately jbd2_cleanup_journal_tail()
* doesn't get called all that often.
*/
- if ((journal->j_fs_dev != journal->j_dev) &&
- (journal->j_flags & JBD2_BARRIER))
+ if (journal->j_flags & JBD2_BARRIER)
blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
if (!(journal->j_flags & JBD2_ABORT))
jbd2_journal_update_superblock(journal, 1);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 8088e00..f32ec4c 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1683,8 +1683,20 @@ 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_DMA_CMA
if (buffer_jbd(bh))
goto busy;
+#else
+ if (buffer_jbd(bh)) {
+ /*
+ * Workaround: In case of CMA page, just commit journal.
+ */
+ if (is_cma_pageblock(page))
+ jbd2_journal_force_commit(journal);
+ else
+ goto busy;
+ }
+#endif
} while ((bh = bh->b_this_page) != head);
ret = try_to_free_buffers(page);