All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 4/7] fs/clntproc: replace schedule_timeout() with msleep_interruptible()
@ 2005-06-20 21:57 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-06-20 21:57 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, Nishanth Aravamudan, domen

[-- Attachment #1: msleep_interruptible-fs_lockd_clntproc.patch --]
[-- Type: text/plain, Size: 1091 bytes --]

From: Nishanth Aravamudan <nacc@us.ibm.com>



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>
---
 clntproc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: quilt/fs/lockd/clntproc.c
===================================================================
--- quilt.orig/fs/lockd/clntproc.c
+++ quilt/fs/lockd/clntproc.c
@@ -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;
 }

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-20 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 21:57 [patch 4/7] fs/clntproc: replace schedule_timeout() with msleep_interruptible() domen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.