VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: zhangyi (F) <yi.zhang@huawei.com> 2019-12-04 20:46:12 +0800 committer: Theodore Ts'o <tytso@mit.edu> 2020-01-25 02:59:25 -0500 commit: 51f57b01e4a3c7d7bdceffd84de35144e8c538e7 parent: d0a186e0d3e7ac05cc77da7c157dae5aa59f95d9
Commit Summary:
ext4, jbd2: ensure panic when aborting with zero errno
Diffstat:
1 file changed, 4 insertions, 11 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 5f9edb12f11a..9e9275540071 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2156,12 +2156,10 @@ static void __journal_abort_soft (journal_t *journal, int errno)
 
 	__jbd2_journal_abort_hard(journal);
 
-	if (errno) {
-		jbd2_journal_update_sb_errno(journal);
-		write_lock(&journal->j_state_lock);
-		journal->j_flags |= JBD2_REC_ERR;
-		write_unlock(&journal->j_state_lock);
-	}
+	jbd2_journal_update_sb_errno(journal);
+	write_lock(&journal->j_state_lock);
+	journal->j_flags |= JBD2_REC_ERR;
+	write_unlock(&journal->j_state_lock);
 }
 
 /**
@@ -2203,11 +2201,6 @@ static void __journal_abort_soft (journal_t *journal, int errno)
  * failure to disk.  ext3_error, for example, now uses this
  * functionality.
  *
- * Errors which originate from within the journaling layer will NOT
- * supply an errno; a null errno implies that absolutely no further
- * writes are done to the journal (unless there are any already in
- * progress).
- *
  */
 
 void jbd2_journal_abort(journal_t *journal, int errno)