]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sunrpc/sched.c
net, sunrpc: suppress allocation warning in rpc_malloc()
[karo-tx-linux.git] / net / sunrpc / sched.c
index ff3cc4bf4b24bc868088a67dd9ad92d40e42f066..c0365c14b858711d7e579308aa3452e4d94701c6 100644 (file)
@@ -637,7 +637,8 @@ static void __rpc_queue_timer_fn(unsigned long ptr)
 
 static void __rpc_atrun(struct rpc_task *task)
 {
-       task->tk_status = 0;
+       if (task->tk_status == -ETIMEDOUT)
+               task->tk_status = 0;
 }
 
 /*
@@ -831,7 +832,8 @@ static void rpc_async_schedule(struct work_struct *work)
  * @size: requested byte size
  *
  * To prevent rpciod from hanging, this allocator never sleeps,
- * returning NULL if the request cannot be serviced immediately.
+ * returning NULL and suppressing warning if the request cannot be serviced
+ * immediately.
  * The caller can arrange to sleep in a way that is safe for rpciod.
  *
  * Most requests are 'small' (under 2KiB) and can be serviced from a
@@ -844,7 +846,7 @@ static void rpc_async_schedule(struct work_struct *work)
 void *rpc_malloc(struct rpc_task *task, size_t size)
 {
        struct rpc_buffer *buf;
-       gfp_t gfp = GFP_NOWAIT;
+       gfp_t gfp = GFP_NOWAIT | __GFP_NOWARN;
 
        if (RPC_IS_SWAPPER(task))
                gfp |= __GFP_MEMALLOC;