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

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

parents db6f4f04 9d6f0d62
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
@@ -1619,6 +1619,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;
	}