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

Submitted by Andrew Morton on Oct. 20, 2010, 10:59 p.m.

Details

Message ID 201010202259.o9KMx8tG009573@imap1.linux-foundation.org
State New, archived
Headers show

Commit Message

Andrew Morton Oct. 20, 2010, 10:59 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(-)

Patch hide | download patch | download mbox

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