[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1283357021-16187-1-git-send-email-w.sang@pengutronix.de>
Date: Wed, 1 Sep 2010 18:03:41 +0200
From: Wolfram Sang <w.sang@...gutronix.de>
To: linux-kernel@...r.kernel.org
Cc: linux-mtd@...ts.infradead.org,
Wolfram Sang <w.sang@...gutronix.de>,
Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
Ingo Molnar <mingo@...e.hu>
Subject: [RFC] jffs2: use cond_resched() instead of yield()
yield() has different semantics meanwhile and even causes RT-kernels to
BUG. Replace the only appearance left in jffs2.
Signed-off-by: Wolfram Sang <w.sang@...gutronix.de>
Cc: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>
Cc: Ingo Molnar <mingo@...e.hu>
---
The aforementioned BUG() showed up in one of our customer's RT-projects. While
this could be handled by rearranging his thread-priorities, I wondered if such
a patch would be worthwhile, still. Reading through the material covering
yield() and related replacements, I believe this patch should be appropriate.
Please say if I missed some side-effects.
fs/jffs2/erase.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index abac961..e513f19 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -151,7 +151,7 @@ int jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count)
}
/* Be nice */
- yield();
+ cond_resched();
mutex_lock(&c->erase_free_sem);
spin_lock(&c->erase_completion_lock);
}
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists