Unverified Commit ed435e21 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10366 v2 jbd2: stop waiting for space when jbd2_cleanup_journal_tail() returns error

parents 2d99a8d0 f2768637
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -98,8 +98,11 @@ __releases(&journal->j_state_lock)
			write_unlock(&journal->j_state_lock);
			if (chkpt) {
				jbd2_log_do_checkpoint(journal);
			} else if (jbd2_cleanup_journal_tail(journal) == 0) {
				/* We were able to recover space; yay! */
			} else if (jbd2_cleanup_journal_tail(journal) <= 0) {
				/*
				 * We were able to recover space or the
				 * journal was aborted due to an error.
				 */
				;
			} else if (tid) {
				/*
+2 −0
Original line number Diff line number Diff line
@@ -1621,6 +1621,8 @@ static int jbd2_write_superblock(journal_t *journal, int write_flags)
	/* Buffer got discarded which means block device got invalidated */
	if (!buffer_mapped(bh)) {
		unlock_buffer(bh);
		if (!is_journal_aborted(journal))
			jbd2_journal_abort(journal, -EIO);
		return -EIO;
	}