diff mbox

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

Message ID 201010012116.o91LGSlt021122@imap1.linux-foundation.org
State New, archived
Headers show

Commit Message

Andrew Morton Oct. 1, 2010, 9:16 p.m. UTC
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(-)

Comments

Artem Bityutskiy Oct. 2, 2010, 2:07 p.m. UTC | #1
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. UTC | #2
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.
diff mbox

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);
 	}