shithub: lwext4

Download patch

ref: 526e3d9d13ec9e7f055407cda23c031e4200f278
parent: aa77b316bfa03a23028c29655bbb2359bb078833
author: ngkaho1234 <[email protected]>
date: Sat Jan 16 21:37:23 EST 2016

ext4_journal: the allocation in jbd_journal_flush_trans must succeed.

--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1277,8 +1277,7 @@
 	struct jbd_journal *journal = trans->journal;
 	struct ext4_fs *fs = journal->jbd_fs->inode_ref.fs;
 	void *tmp_data = malloc(journal->block_size);
-	if (!tmp_data)
-		return;
+	ext4_assert(tmp_data);
 
 	TAILQ_FOREACH_SAFE(jbd_buf, &trans->buf_queue, buf_node,
 			tmp) {