linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: domen@coderock.org
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-fsdevel@vger.kernel.org, domen@coderock.org, nacc@us.ibm.com
Subject: [patch 5/7] fs/clntproc: replace schedule_timeout() with msleep_interruptible()
Date: Sun, 06 Mar 2005 11:37:44 +0100	[thread overview]
Message-ID: <20050306103745.14B7A1F23B@trashy.coderock.org> (raw)




Use msleep_interruptible() instead of schedule_timeout(). The
existing code is not incorrect, but msleep_interruptible() offers two
advantages: 1) consistency across the kernel and 2) human-sensible time units
(msecs).

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/fs/lockd/clntproc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/lockd/clntproc.c~msleep_interruptible-fs_lockd_clntproc fs/lockd/clntproc.c
--- kj/fs/lockd/clntproc.c~msleep_interruptible-fs_lockd_clntproc	2005-03-05 16:11:04.000000000 +0100
+++ kj-domen/fs/lockd/clntproc.c	2005-03-05 16:11:04.000000000 +0100
@@ -14,6 +14,7 @@
 #include <linux/nfs_fs.h>
 #include <linux/utsname.h>
 #include <linux/smp_lock.h>
+#include <linux/delay.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/lockd/lockd.h>
@@ -298,8 +299,7 @@ nlmclnt_alloc_call(void)
 			return call;
 		}
 		printk("nlmclnt_alloc_call: failed, waiting for memory\n");
-		current->state = TASK_INTERRUPTIBLE;
-		schedule_timeout(5*HZ);
+		msleep_interruptible(5000);
 	}
 	return NULL;
 }
_

                 reply	other threads:[~2005-03-06 10:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20050306103745.14B7A1F23B@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nacc@us.ibm.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).