diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 19:46:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 19:46:07 -0500 |
commit | 8d05b3771da8775799673212b57d62f57c70d68a (patch) | |
tree | ebce0455032cec54428227022c92a480fa726da0 /net | |
parent | b695188dd39162a1a6bff11fdbcc4c0b65b933ab (diff) | |
parent | 512e4b291c0e97af24619a91f3e8963697da00d8 (diff) |
Merge tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
"We've just concluded another Connectathon interoperability testing
week, and so here are the fixes for the bugs that were discovered:
- Don't allow NFS silly-renamed files to be deleted
- Don't start the retransmission timer when out of socket space
- Fix a couple of pnfs-related Oopses.
- Fix one more NFSv4 state recovery deadlock
- Don't loop forever when LAYOUTGET returns NFS4ERR_LAYOUTTRYLATER"
* tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
SUNRPC: One line comment fix
NFSv4.1: LAYOUTGET EDELAY loops timeout to the MDS
SUNRPC: add call to get configured timeout
PNFS: set the default DS timeout to 60 seconds
NFSv4: Fix another open/open_recovery deadlock
nfs: don't allow nfs_find_actor to match inodes of the wrong type
NFSv4.1: Hold reference to layout hdr in layoutget
pnfs: fix resend_to_mds for directio
SUNRPC: Don't start the retransmission timer when out of socket space
NFS: Don't allow NFS silly-renamed files to be deleted, no signal
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 15 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 6 |
2 files changed, 20 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d7a369e61085..dcc446e7fbf6 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1197,6 +1197,21 @@ size_t rpc_max_payload(struct rpc_clnt *clnt) | |||
1197 | EXPORT_SYMBOL_GPL(rpc_max_payload); | 1197 | EXPORT_SYMBOL_GPL(rpc_max_payload); |
1198 | 1198 | ||
1199 | /** | 1199 | /** |
1200 | * rpc_get_timeout - Get timeout for transport in units of HZ | ||
1201 | * @clnt: RPC client to query | ||
1202 | */ | ||
1203 | unsigned long rpc_get_timeout(struct rpc_clnt *clnt) | ||
1204 | { | ||
1205 | unsigned long ret; | ||
1206 | |||
1207 | rcu_read_lock(); | ||
1208 | ret = rcu_dereference(clnt->cl_xprt)->timeout->to_initval; | ||
1209 | rcu_read_unlock(); | ||
1210 | return ret; | ||
1211 | } | ||
1212 | EXPORT_SYMBOL_GPL(rpc_get_timeout); | ||
1213 | |||
1214 | /** | ||
1200 | * rpc_force_rebind - force transport to check that remote port is unchanged | 1215 | * rpc_force_rebind - force transport to check that remote port is unchanged |
1201 | * @clnt: client to rebind | 1216 | * @clnt: client to rebind |
1202 | * | 1217 | * |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 846c34fdee9f..b7478d5e7ffd 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -487,13 +487,17 @@ EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks); | |||
487 | * xprt_wait_for_buffer_space - wait for transport output buffer to clear | 487 | * xprt_wait_for_buffer_space - wait for transport output buffer to clear |
488 | * @task: task to be put to sleep | 488 | * @task: task to be put to sleep |
489 | * @action: function pointer to be executed after wait | 489 | * @action: function pointer to be executed after wait |
490 | * | ||
491 | * Note that we only set the timer for the case of RPC_IS_SOFT(), since | ||
492 | * we don't in general want to force a socket disconnection due to | ||
493 | * an incomplete RPC call transmission. | ||
490 | */ | 494 | */ |
491 | void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action) | 495 | void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action) |
492 | { | 496 | { |
493 | struct rpc_rqst *req = task->tk_rqstp; | 497 | struct rpc_rqst *req = task->tk_rqstp; |
494 | struct rpc_xprt *xprt = req->rq_xprt; | 498 | struct rpc_xprt *xprt = req->rq_xprt; |
495 | 499 | ||
496 | task->tk_timeout = req->rq_timeout; | 500 | task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0; |
497 | rpc_sleep_on(&xprt->pending, task, action); | 501 | rpc_sleep_on(&xprt->pending, task, action); |
498 | } | 502 | } |
499 | EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space); | 503 | EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space); |