diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-17 09:07:11 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-17 09:38:07 +0000 |
| commit | 824e15d0a277d9c6b9e357226dce4ae79d748bbc (patch) | |
| tree | 10558c3340ac809942da042b4d6992229d68671a | |
| parent | 6cb2cd7182476f06e85b699bc41fef11a3324792 (diff) | |
ext4_journal: add jbd_journal_commit_all routine.
| -rw-r--r-- | lwext4/ext4_journal.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lwext4/ext4_journal.c b/lwext4/ext4_journal.c index 7e148e8..5cd70f4 100644 --- a/lwext4/ext4_journal.c +++ b/lwext4/ext4_journal.c @@ -1187,9 +1187,6 @@ static void jbd_trans_end_write(struct ext4_bcache *bc __unused, } } -/* - * XXX: one should disable cache writeback first. - */ void jbd_journal_commit_one(struct jbd_journal *journal) { int rc = EOK; @@ -1244,6 +1241,13 @@ Finish: } } +void jbd_journal_commit_all(struct jbd_journal *journal) +{ + while (!TAILQ_EMPTY(&journal->trans_queue)) { + jbd_journal_commit_one(journal); + } +} + /** * @} */ |
