Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9930
b: refs/heads/master
c: 23475d6
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Sep 23, 2005
1 parent 4c87659 commit 8c15985
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9aa48b7e270d13c8781414dce081a42cae20a80d
refs/heads/master: 23475d66bd8600e0c5353f86c1b74f68df27bdb5
27 changes: 18 additions & 9 deletions trunk/net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,24 +592,33 @@ xprt_connect_status(struct rpc_task *task)
return;
}

/* if soft mounted, just cause this RPC to fail */
if (RPC_IS_SOFT(task))
task->tk_status = -EIO;

switch (task->tk_status) {
case -ECONNREFUSED:
case -ECONNRESET:
dprintk("RPC: %4d xprt_connect_status: server %s refused connection\n",
task->tk_pid, task->tk_client->cl_server);
break;
case -ENOTCONN:
return;
dprintk("RPC: %4d xprt_connect_status: connection broken\n",
task->tk_pid);
break;
case -ETIMEDOUT:
dprintk("RPC: %4d xprt_connect_status: timed out\n",
dprintk("RPC: %4d xprt_connect_status: connect attempt timed out\n",
task->tk_pid);
break;
default:
printk(KERN_ERR "RPC: error %d connecting to server %s\n",
-task->tk_status, task->tk_client->cl_server);
dprintk("RPC: %4d xprt_connect_status: error %d connecting to server %s\n",
task->tk_pid, -task->tk_status, task->tk_client->cl_server);
xprt_release_write(xprt, task);
task->tk_status = -EIO;
return;
}

/* if soft mounted, just cause this RPC to fail */
if (RPC_IS_SOFT(task)) {
xprt_release_write(xprt, task);
task->tk_status = -EIO;
}
xprt_release_write(xprt, task);
}

/*
Expand Down

0 comments on commit 8c15985

Please sign in to comment.