patch-2.1.58 linux/fs/lockd/clntproc.c

Next file: linux/fs/lockd/svc.c
Previous file: linux/fs/file_table.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.57/linux/fs/lockd/clntproc.c linux/fs/lockd/clntproc.c
@@ -160,8 +160,9 @@
 nlmclnt_grace_wait(struct nlm_host *host)
 {
 	if (!host->h_reclaiming)
-		current->timeout = 10 * HZ;
+		current->timeout = jiffies + 10 * HZ;
 	interruptible_sleep_on(&host->h_gracewait);
+	current->timeout = 0;
 	return signalled()? -ERESTARTSYS : 0;
 }
 
@@ -178,9 +179,11 @@
 					sizeof(struct nlm_rqst));
 		if (call)
 			return call;
-		current->timeout = 5 * HZ;
+		printk("nlmclnt_alloc_call: failed, waiting for memory\n");
+		current->timeout = jiffies + 5 * HZ;
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
+		current->timeout = 0;
 	}
 	return NULL;
 }
@@ -232,6 +235,7 @@
 		/* Back off a little and try again */
 		current->timeout = jiffies + 15 * HZ;
 		interruptible_sleep_on(&host->h_gracewait);
+		current->timeout = 0;
 	} while (!signalled());
 
 	return -ERESTARTSYS;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov