SUNRPC: Fix a UDP transport regression
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 7 Sep 2012 15:08:50 +0000 (11:08 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 7 Sep 2012 15:43:49 +0000 (11:43 -0400)
commitf39c1bfb5a03e2d255451bff05be0d7255298fa4
treec4f7c970840e7803e22ce10809746272d23f6fde
parent01913b49cf1dc6409a07dd2a4cc6af2e77f3c410
SUNRPC: Fix a UDP transport regression

Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that
we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
hangs in the case of NFS over UDP mounts.

Since neither the UDP or the RDMA transport mechanism use dynamic slot
allocation, we can skip grabbing the socket lock for those transports.
Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
case.

Note that the NFSv4.1 back channel assigns the slot directly
through rpc_run_bc_task, so we can ignore that case.

Reported-by: Dick Streefland <dick.streefland@altium.nl>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>= 3.1]
include/linux/sunrpc/xprt.h
net/sunrpc/xprt.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c