[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>
This commit is contained in:
committed by
David S. Miller
parent
7672d0b544
commit
121caf577d
@@ -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;
|
||||
|
Reference in New Issue
Block a user