aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyusuke Konishi <[email protected]>2016-08-02 14:05:19 -0700
committerLinus Torvalds <[email protected]>2016-08-02 19:35:19 -0400
commitaceb4170bb2ba88c5327cc69b9c91a708c7f7046 (patch)
treea6e402b2cecae9878f7aebeb1c9006493f4d4e59
parent39a9dcca61a3d1375b9440676cbfc541804cd217 (diff)
nilfs2: do not use yield()
Use cond_resched() instead of yield() in the loop of nilfs_transaction_lock() since the usage corresponds to the "be nice for others" case that the comment of yield() says. This removes the following checkpatch.pl warning: "WARNING: Using yield() is generally wrong. See yield() kernel-doc (sched/core.c)" Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/nilfs2/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 7e1864c6035b..5a97282aa074 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -373,7 +373,7 @@ static void nilfs_transaction_lock(struct super_block *sb,
nilfs_segctor_do_immediate_flush(sci);
up_write(&nilfs->ns_segctor_sem);
- yield();
+ cond_resched();
}
if (gcflag)
ti->ti_flags |= NILFS_TI_GC;