Skip to contentSkip to conversation

jffs2: use cond_resched() instead of yield()

PATCH New [email protected] 1 participant 1 message Oct 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 jffs2: use cond_resched() instead of yield()

From: Wolfram Sang <[email protected]>

yield() has different semantics meanwhile and even causes RT-kernels to BUG. Replace the only appearance left in jffs2.

Cc Artem Bityutskiy <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Artem Bityutskiy <[email protected]>

---

 fs/jffs2/erase.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/jffs2/erase.c renamed from fs/jffs2/erase.c~jffs2-use-cond_resched-instead-of-yield +1 -1
diff -puN fs/jffs2/erase.c~jffs2-use-cond_resched-instead-of-yield 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);
 	}

_