* @brief Journal handle functions
*/
-#include "ext4_config.h"
-#include "ext4_types.h"
-#include "ext4_misc.h"
-#include "ext4_errno.h"
-#include "ext4_debug.h"
-
-#include "ext4_fs.h"
-#include "ext4_super.h"
-#include "ext4_journal.h"
-#include "ext4_blockdev.h"
-#include "ext4_crc32.h"
-#include "ext4_journal.h"
+#include <ext4_config.h>
+#include <ext4_types.h>
+#include <ext4_misc.h>
+#include <ext4_errno.h>
+#include <ext4_debug.h>
+
+#include <ext4_fs.h>
+#include <ext4_super.h>
+#include <ext4_journal.h>
+#include <ext4_blockdev.h>
+#include <ext4_crc32.h>
+#include <ext4_journal.h>
#include <string.h>
#include <stdlib.h>
trans->alloc_blocks++;
wrap(&journal->jbd_fs->sb, journal->last);
- /* If there is no space left, flush all journalled
- * blocks to disk first.*/
- if (journal->last == journal->start)
- jbd_journal_purge_cp_trans(journal, true, false);
+ /* If there is no space left, flush just one journalled
+ * transaction.*/
+ if (journal->last == journal->start) {
+ jbd_journal_purge_cp_trans(journal, true, true);
+ ext4_assert(journal->last != journal->start);
+ }
return start_block;
}