@@ -3445,6 +3445,13 @@ xlog_recover_finish(
int error;
error = xlog_recover_process_intents(log);
+ /*
+ * Sync the log to get all the intents that have done item out of
+ * the AIL. This isn't absolutely necessary, but it helps in case
+ * the unlink transactions would have problems pushing the intents
+ * out of the way.
+ */
+ xfs_log_force(log->l_mp, XFS_LOG_SYNC);
if (error) {
/*
* Cancel all the unprocessed intent items now so that we don't
@@ -3459,13 +3466,6 @@ xlog_recover_finish(
return error;
}
- /*
- * Sync the log to get all the intents out of the AIL. This isn't
- * absolutely necessary, but it helps in case the unlink transactions
- * would have problems pushing the intents out of the way.
- */
- xfs_log_force(log->l_mp, XFS_LOG_SYNC);
-
/*
* Now that we've recovered the log and all the intents, we can clear
* the log incompat feature bits in the superblock because there's no