jffs2: use cond_resched() instead of yield()
authorWolfram Sang <w.sang@pengutronix.de>
Wed, 1 Sep 2010 16:03:41 +0000 (18:03 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 24 Oct 2010 23:14:01 +0000 (00:14 +0100)
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>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/erase.c

index abac961f617b88a739ad3bfbaa49233d45d9e6d4..e513f1913c1522a8e9e8dbc4f501a4804507d182 100644 (file)
@@ -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);
        }