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

Commit a70a4fa5 authored by Brian Foster's avatar Brian Foster Committed by Dave Chinner
Browse files

xfs: fix a couple error sequence jumps in xfs_mountfs()



xfs_mountfs() has a couple failure conditions that do not jump to the
correct labels. Specifically:

- xfs_initialize_perag_data() failure does not deallocate the log even
  though it occurs after log initialization
- xfs_mount_reset_sbqflags() failure returns the error directly rather
  than jump to the error sequence

Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 7f8a058f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -855,7 +855,7 @@ xfs_mountfs(
	     !mp->m_sb.sb_inprogress) {
	     !mp->m_sb.sb_inprogress) {
		error = xfs_initialize_perag_data(mp, sbp->sb_agcount);
		error = xfs_initialize_perag_data(mp, sbp->sb_agcount);
		if (error)
		if (error)
			goto out_fail_wait;
			goto out_log_dealloc;;
	}
	}


	/*
	/*
@@ -927,7 +927,7 @@ xfs_mountfs(
			xfs_notice(mp, "resetting quota flags");
			xfs_notice(mp, "resetting quota flags");
			error = xfs_mount_reset_sbqflags(mp);
			error = xfs_mount_reset_sbqflags(mp);
			if (error)
			if (error)
				return error;
				goto out_rtunmount;
		}
		}
	}
	}