Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5480adb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "jbd2: Fix use after free after error in jbd2_journal_dirty_metadata()"

parents 6913f288 1d688b74
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -219,10 +219,10 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
	set_buffer_prio(bh);
	if (ext4_handle_valid(handle)) {
		err = jbd2_journal_dirty_metadata(handle, bh);
		if (err) {
		/* Errors can only happen if there is a bug */
			handle->h_err = err;
			__ext4_journal_stop(where, line, handle);
		if (WARN_ON_ONCE(err)) {
			ext4_journal_abort_handle(where, line, __func__, bh,
						  handle, err);
		}
	} else {
		if (inode)