jffs2: use cond_resched() instead of yield()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Oct 24 20:59:06 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3866f673ebd86e5be2533923f5c0aed91fe1669f
Commit:     3866f673ebd86e5be2533923f5c0aed91fe1669f
Parent:     d2ac467a108400ff1ae682a423c7d41265e62d47
Author:     Wolfram Sang <w.sang at pengutronix.de>
AuthorDate: Wed Sep 1 18:03:41 2010 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Oct 25 00:14:01 2010 +0100

    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 at pengutronix.de>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 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);
 	}



More information about the linux-mtd-cvs mailing list