shithub: lwext4

Download patch

ref: 1f9d420fe047309062e155c52e548c6237c5c44d
parent: e970afced259e8a524cef8cd1d74120e3c70eb1a
author: ngkaho1234 <[email protected]>
date: Mon Dec 14 11:17:15 EST 2015

ext4_journal: fix wrong endianess of revoke header's count field.

--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1049,7 +1049,8 @@
 		}
 
 		if (tag_tbl_size < record_len) {
-			header->count = journal->block_size - tag_tbl_size;
+			jbd_set32(header, count,
+				  journal->block_size - tag_tbl_size);
 			jbd_block_set(journal->jbd_fs, &desc_block);
 			desc_iblock = 0;
 			header = NULL;
@@ -1071,7 +1072,8 @@
 	}
 	if (rc == EOK && desc_iblock) {
 		if (header != NULL)
-			header->count = journal->block_size - tag_tbl_size;
+			jbd_set32(header, count,
+				  journal->block_size - tag_tbl_size);
 
 		jbd_block_set(journal->jbd_fs, &desc_block);
 	}