From 121caf577dc61588c1128821873a08cec48baf58 Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Mon, 12 Sep 2005 14:15:34 -0700 Subject: [NET]: fix-up schedule_timeout() usage Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time conversion functions instead of hard-coded division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- net/sunrpc/svcsock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/sunrpc') diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 05fe2e7..51885b5 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -1170,8 +1170,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout) while (rqstp->rq_arghi < pages) { struct page *p = alloc_page(GFP_KERNEL); if (!p) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/2); + schedule_timeout_uninterruptible(msecs_to_jiffies(500)); continue; } rqstp->rq_argpages[rqstp->rq_arghi++] = p; -- cgit v1.1