VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: luojiajun <luojiajun3@huawei.com> 2019-03-01 00:30:00 -0500 committer: Theodore Ts'o <tytso@mit.edu> 2019-03-01 00:30:00 -0500 commit: 6e876c3dd205d30b0db6850e97a03d75457df007 parent: 7bd75230b43727b258a4f7a59d62114cffe1b6c8
Commit Summary:
jbd2: fix invalid descriptor block checksum
Diffstat:
1 file changed, 4 insertions, 1 deletion
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 2eb55c3361a8..efd0ce9489ae 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -694,9 +694,11 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                            the last tag we set up. */
 
 			tag->t_flags |= cpu_to_be16(JBD2_FLAG_LAST_TAG);
-
-			jbd2_descriptor_block_csum_set(journal, descriptor);
 start_journal_io:
+			if (descriptor)
+				jbd2_descriptor_block_csum_set(journal,
+							descriptor);
+
 			for (i = 0; i < bufs; i++) {
 				struct buffer_head *bh = wbuf[i];
 				/*