@@ -14,7 +14,6 @@
#include <linux/kthread.h>
#include <linux/time.h>
#include <linux/random.h>
-#include <linux/delay.h>
#include <linux/writeback.h>
#include <cluster/masklog.h>
@@ -2326,7 +2325,7 @@ static int __ocfs2_wait_on_mount(struct ocfs2_super *osb, int quota)
static int ocfs2_commit_thread(void *arg)
{
- int status;
+ int status = 0;
struct ocfs2_super *osb = arg;
struct ocfs2_journal *journal = osb->journal;
@@ -2343,18 +2342,11 @@ static int ocfs2_commit_thread(void *arg)
status = ocfs2_commit_cache(osb);
if (status < 0) {
- static unsigned long abort_warn_time;
-
- /* Warn about this once per minute */
- if (printk_timed_ratelimit(&abort_warn_time, 60*HZ))
- mlog(ML_ERROR, "status = %d, journal is "
- "already aborted.\n", status);
/*
- * After ocfs2_commit_cache() fails, j_num_trans has a
- * non-zero value. Sleep here to avoid a busy-wait
- * loop.
+ * Journal can not recover from abort state, there is
+ * no need to keep commit cache. So, we should panic.
*/
- msleep_interruptible(1000);
+ ocfs2_abort(osb->sb, "Detected aborted journal");
}
if (kthread_should_stop() && atomic_read(&journal->j_num_trans)){