From 0e056c071361845dd2d60e254ad42d89d423eeec Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 22 May 2014 10:42:31 +1000 Subject: [PATCH] ocfs2-limit-printk-when-journal-is-aborted-fix document the msleep Cc: Joel Becker Cc: Joseph Qi Cc: Mark Fasheh Signed-off-by: Andrew Morton --- fs/ocfs2/journal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 2896220fd143..4b0c68849b36 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -2193,6 +2193,11 @@ static int ocfs2_commit_thread(void *arg) 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. + */ msleep_interruptible(1000); } -- 2.39.5