aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 00eb859b7de5..fa48c60aef23 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -717,6 +717,15 @@ void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt)
717 atomic_inc(&clnt->cl_count); 717 atomic_inc(&clnt->cl_count);
718 if (clnt->cl_softrtry) 718 if (clnt->cl_softrtry)
719 task->tk_flags |= RPC_TASK_SOFT; 719 task->tk_flags |= RPC_TASK_SOFT;
720 if (sk_memalloc_socks()) {
721 struct rpc_xprt *xprt;
722
723 rcu_read_lock();
724 xprt = rcu_dereference(clnt->cl_xprt);
725 if (xprt->swapper)
726 task->tk_flags |= RPC_TASK_SWAPPER;
727 rcu_read_unlock();
728 }
720 /* Add to the client's list of all tasks */ 729 /* Add to the client's list of all tasks */
721 spin_lock(&clnt->cl_lock); 730 spin_lock(&clnt->cl_lock);
722 list_add_tail(&task->tk_task, &clnt->cl_tasks); 731 list_add_tail(&task->tk_task, &clnt->cl_tasks);
@@ -1844,12 +1853,13 @@ call_timeout(struct rpc_task *task)
1844 return; 1853 return;
1845 } 1854 }
1846 if (RPC_IS_SOFT(task)) { 1855 if (RPC_IS_SOFT(task)) {
1847 if (clnt->cl_chatty) 1856 if (clnt->cl_chatty) {
1848 rcu_read_lock(); 1857 rcu_read_lock();
1849 printk(KERN_NOTICE "%s: server %s not responding, timed out\n", 1858 printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
1850 clnt->cl_protname, 1859 clnt->cl_protname,
1851 rcu_dereference(clnt->cl_xprt)->servername); 1860 rcu_dereference(clnt->cl_xprt)->servername);
1852 rcu_read_unlock(); 1861 rcu_read_unlock();
1862 }
1853 if (task->tk_flags & RPC_TASK_TIMEOUT) 1863 if (task->tk_flags & RPC_TASK_TIMEOUT)
1854 rpc_exit(task, -ETIMEDOUT); 1864 rpc_exit(task, -ETIMEDOUT);
1855 else 1865 else