Skip to contentSkip to conversation

fs/clntproc: replace schedule_timeout() with msleep_interruptible()

PATCH In review [email protected] 1 participant 1 message Jun 20, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/7 fs/clntproc: replace schedule_timeout() with msleep_interruptible()

From: Nishanth Aravamudan <[email protected]>

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).

---
 clntproc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/lockd/clntproc.c +2 -2
Index: 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;
 }

--