Patchwork [2/2] jffs2: use cond_resched() instead of yield()

login
register
mail settings
Submitter Andrew Morton
Date Oct. 1, 2010, 9:16 p.m.
Message ID <201010012116.o91LGSlt021122@imap1.linux-foundation.org>
Download mbox | patch
Permalink /patch/66518/
State New
Headers show

Comments

Andrew Morton - Oct. 1, 2010, 9:16 p.m.
From: Wolfram Sang <w.sang@pengutronix.de>

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@pengutronix.de>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/jffs2/erase.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Artem Bityutskiy - Oct. 2, 2010, 2:07 p.m.
On Fri, 2010-10-01 at 14:16 -0700, akpm@linux-foundation.org wrote:
> From: Wolfram Sang <w.sang@pengutronix.de>
> 
> yield() has different semantics meanwhile and even causes RT-kernels to
> BUG.  Replace the only appearance left in jffs2.
> 

This patch is also in my l2-mtd-2.6.git tree.
Andrew Morton - Oct. 2, 2010, 7:10 p.m.
On Sat, 02 Oct 2010 17:07:55 +0300 Artem Bityutskiy <dedekind1@gmail.com> wrote:

> On Fri, 2010-10-01 at 14:16 -0700, akpm@linux-foundation.org wrote:
> > From: Wolfram Sang <w.sang@pengutronix.de>
> > 
> > yield() has different semantics meanwhile and even causes RT-kernels to
> > BUG.  Replace the only appearance left in jffs2.
> > 
> 
> This patch is also in my l2-mtd-2.6.git tree.

And I'll keep sending it and you'll keep telling me it's in your tree
until this situation gets fixed.

Patch

diff -puN fs/jffs2/erase.c~jffs2-use-cond_resched-instead-of-yield fs/jffs2/erase.c
--- a/fs/jffs2/erase.c~jffs2-use-cond_resched-instead-of-yield
+++ a/fs/jffs2/erase.c
@@ -151,7 +151,7 @@  int jffs2_erase_pending_blocks(struct jf
 		}
 
 		/* Be nice */
-		yield();
+		cond_resched();
 		mutex_lock(&c->erase_free_sem);
 		spin_lock(&c->erase_completion_lock);
 	}