summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-12 14:15:34 -0700
committerDavid S. Miller <davem@davemloft.net>2005-09-12 14:15:34 -0700
commit121caf577dc61588c1128821873a08cec48baf58 (patch)
tree751e2e6bf9b58aa4b40e8285d357b0cf083ae8cc /net/sunrpc/svcsock.c
parent7672d0b54411371e0b6a831c1cb2f0ce615de6dc (diff)
downloadlinux-121caf577dc61588c1128821873a08cec48baf58.tar.gz
linux-121caf577dc61588c1128821873a08cec48baf58.tar.bz2
linux-121caf577dc61588c1128821873a08cec48baf58.zip
[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 <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 05fe2e735538..51885b5f744e 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;