LKML Archive on
 help / color / Atom feed
From: Ryusuke Konishi <>
To: Andrew Morton <>
Cc: linux-nilfs <>,
	LKML <>,
	Ryusuke Konishi <>
Subject: [PATCH 7/8] nilfs2: do not use yield()
Date: Thu,  2 Jun 2016 22:58:10 +0900
Message-ID: <> (raw)
In-Reply-To: <>

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 warning:

 "WARNING: Using yield() is generally wrong. See yield() kernel-doc

Signed-off-by: Ryusuke Konishi <>
 fs/nilfs2/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 7e1864c..5a97282 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -373,7 +373,7 @@ static void nilfs_transaction_lock(struct super_block *sb,
-		yield();
+		cond_resched();
 	if (gcflag)
 		ti->ti_flags |= NILFS_TI_GC;

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 13:58 [PATCH 0/8] nilfs2 updates Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 1/8] nilfs2: hide function name argument from nilfs_error() Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 2/8] nilfs2: add nilfs_msg() message interface Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 3/8] nilfs2: embed a back pointer to super block instance in nilfs object Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 4/8] nilfs2: reduce bare use of printk() with nilfs_msg() Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 5/8] nilfs2: replace nilfs_warning() " Ryusuke Konishi
2016-06-02 13:58 ` [PATCH 6/8] nilfs2: emit error message when I/O error is detected Ryusuke Konishi
2016-06-02 13:58 ` Ryusuke Konishi [this message]
2016-06-02 13:58 ` [PATCH 8/8] nilfs2: refactor parser of snapshot mount option Ryusuke Konishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone