xfs: force the log offline when log intent item recovery fails
[sfrench/cifs-2.6.git] / fs / xfs / xfs_log_recover.c
index 1227503d22463cc2b45bcdd859129bdbf38ee4ee..1721fce2ec94397b28a2e6713538cfadbd2c3c94 100644 (file)
@@ -2458,8 +2458,10 @@ xlog_finish_defer_ops(
 
                error = xfs_trans_alloc(mp, &resv, dfc->dfc_blkres,
                                dfc->dfc_rtxres, XFS_TRANS_RESERVE, &tp);
-               if (error)
+               if (error) {
+                       xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR);
                        return error;
+               }
 
                /*
                 * Transfer to this new transaction all the dfops we captured
@@ -3449,6 +3451,7 @@ xlog_recover_finish(
                         * this) before we get around to xfs_log_mount_cancel.
                         */
                        xlog_recover_cancel_intents(log);
+                       xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR);
                        xfs_alert(log->l_mp, "Failed to recover intents");
                        return error;
                }