diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:45:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:45:44 -0400 |
commit | 6dbb35b0a74b44b2a48a5373d48074c5aa69fdf5 (patch) | |
tree | 4afb5eec521659e19c9d2343c2431054a082eb06 /net/sunrpc | |
parent | fd37ce34bd512f2b1a503f82abf8768da556a955 (diff) | |
parent | ad0fcd4eb68059de02e1766948263c71b8a5b1dc (diff) |
Merge tag 'nfs-for-3.6-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull second wave of NFS client updates from Trond Myklebust:
- Patches from Bryan to allow splitting of the NFSv2/v3/v4 code into
separate modules.
- Fix Oopses in the NFSv4 idmapper
- Fix a deadlock whereby rpciod tries to allocate a new socket and ends
up recursing into the NFS code due to memory reclaim.
- Increase the number of permitted callback connections.
* tag 'nfs-for-3.6-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
nfs: explicitly reject LOCK_MAND flock() requests
nfs: increase number of permitted callback connections.
SUNRPC: return negative value in case rpcbind client creation error
NFS: Convert v4 into a module
NFS: Convert v3 into a module
NFS: Convert v2 into a module
NFS: Keep module parameters in the generic NFS client
NFS: Split out remaining NFS v4 inode functions
NFS: Pass super operations and xattr handlers in the nfs_subversion
NFS: Only initialize the ACL client in the v3 case
NFS: Create a try_mount rpc op
NFS: Remove the NFS v4 xdev mount function
NFS: Add version registering framework
NFS: Fix a number of bugs in the idmapper
nfs: skip commit in releasepage if we're freeing memory for fs-related reasons
sunrpc: clarify comments on rpc_make_runnable
pnfsblock: bail out partial page IO
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 4 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 7 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 3 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 10 |
4 files changed, 19 insertions, 5 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 92509ffe15fc..a70acae496e4 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -251,7 +251,7 @@ static int rpcb_create_local_unix(struct net *net) | |||
251 | if (IS_ERR(clnt)) { | 251 | if (IS_ERR(clnt)) { |
252 | dprintk("RPC: failed to create AF_LOCAL rpcbind " | 252 | dprintk("RPC: failed to create AF_LOCAL rpcbind " |
253 | "client (errno %ld).\n", PTR_ERR(clnt)); | 253 | "client (errno %ld).\n", PTR_ERR(clnt)); |
254 | result = -PTR_ERR(clnt); | 254 | result = PTR_ERR(clnt); |
255 | goto out; | 255 | goto out; |
256 | } | 256 | } |
257 | 257 | ||
@@ -298,7 +298,7 @@ static int rpcb_create_local_net(struct net *net) | |||
298 | if (IS_ERR(clnt)) { | 298 | if (IS_ERR(clnt)) { |
299 | dprintk("RPC: failed to create local rpcbind " | 299 | dprintk("RPC: failed to create local rpcbind " |
300 | "client (errno %ld).\n", PTR_ERR(clnt)); | 300 | "client (errno %ld).\n", PTR_ERR(clnt)); |
301 | result = -PTR_ERR(clnt); | 301 | result = PTR_ERR(clnt); |
302 | goto out; | 302 | goto out; |
303 | } | 303 | } |
304 | 304 | ||
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 994cfea2bad6..1f19aa15f89b 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -300,8 +300,9 @@ EXPORT_SYMBOL_GPL(__rpc_wait_for_completion_task); | |||
300 | /* | 300 | /* |
301 | * Make an RPC task runnable. | 301 | * Make an RPC task runnable. |
302 | * | 302 | * |
303 | * Note: If the task is ASYNC, this must be called with | 303 | * Note: If the task is ASYNC, and is being made runnable after sitting on an |
304 | * the spinlock held to protect the wait queue operation. | 304 | * rpc_wait_queue, this must be called with the queue spinlock held to protect |
305 | * the wait queue operation. | ||
305 | */ | 306 | */ |
306 | static void rpc_make_runnable(struct rpc_task *task) | 307 | static void rpc_make_runnable(struct rpc_task *task) |
307 | { | 308 | { |
@@ -790,7 +791,9 @@ void rpc_execute(struct rpc_task *task) | |||
790 | 791 | ||
791 | static void rpc_async_schedule(struct work_struct *work) | 792 | static void rpc_async_schedule(struct work_struct *work) |
792 | { | 793 | { |
794 | current->flags |= PF_FSTRANS; | ||
793 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); | 795 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); |
796 | current->flags &= ~PF_FSTRANS; | ||
794 | } | 797 | } |
795 | 798 | ||
796 | /** | 799 | /** |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index b446e100286f..06cdbff79e4a 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -200,6 +200,7 @@ xprt_rdma_connect_worker(struct work_struct *work) | |||
200 | int rc = 0; | 200 | int rc = 0; |
201 | 201 | ||
202 | if (!xprt->shutdown) { | 202 | if (!xprt->shutdown) { |
203 | current->flags |= PF_FSTRANS; | ||
203 | xprt_clear_connected(xprt); | 204 | xprt_clear_connected(xprt); |
204 | 205 | ||
205 | dprintk("RPC: %s: %sconnect\n", __func__, | 206 | dprintk("RPC: %s: %sconnect\n", __func__, |
@@ -212,10 +213,10 @@ xprt_rdma_connect_worker(struct work_struct *work) | |||
212 | 213 | ||
213 | out: | 214 | out: |
214 | xprt_wake_pending_tasks(xprt, rc); | 215 | xprt_wake_pending_tasks(xprt, rc); |
215 | |||
216 | out_clear: | 216 | out_clear: |
217 | dprintk("RPC: %s: exit\n", __func__); | 217 | dprintk("RPC: %s: exit\n", __func__); |
218 | xprt_clear_connecting(xprt); | 218 | xprt_clear_connecting(xprt); |
219 | current->flags &= ~PF_FSTRANS; | ||
219 | } | 220 | } |
220 | 221 | ||
221 | /* | 222 | /* |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 62d0dac8f780..926679459e71 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1892,6 +1892,8 @@ static void xs_local_setup_socket(struct work_struct *work) | |||
1892 | if (xprt->shutdown) | 1892 | if (xprt->shutdown) |
1893 | goto out; | 1893 | goto out; |
1894 | 1894 | ||
1895 | current->flags |= PF_FSTRANS; | ||
1896 | |||
1895 | clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); | 1897 | clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); |
1896 | status = __sock_create(xprt->xprt_net, AF_LOCAL, | 1898 | status = __sock_create(xprt->xprt_net, AF_LOCAL, |
1897 | SOCK_STREAM, 0, &sock, 1); | 1899 | SOCK_STREAM, 0, &sock, 1); |
@@ -1925,6 +1927,7 @@ static void xs_local_setup_socket(struct work_struct *work) | |||
1925 | out: | 1927 | out: |
1926 | xprt_clear_connecting(xprt); | 1928 | xprt_clear_connecting(xprt); |
1927 | xprt_wake_pending_tasks(xprt, status); | 1929 | xprt_wake_pending_tasks(xprt, status); |
1930 | current->flags &= ~PF_FSTRANS; | ||
1928 | } | 1931 | } |
1929 | 1932 | ||
1930 | static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) | 1933 | static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) |
@@ -1967,6 +1970,8 @@ static void xs_udp_setup_socket(struct work_struct *work) | |||
1967 | if (xprt->shutdown) | 1970 | if (xprt->shutdown) |
1968 | goto out; | 1971 | goto out; |
1969 | 1972 | ||
1973 | current->flags |= PF_FSTRANS; | ||
1974 | |||
1970 | /* Start by resetting any existing state */ | 1975 | /* Start by resetting any existing state */ |
1971 | xs_reset_transport(transport); | 1976 | xs_reset_transport(transport); |
1972 | sock = xs_create_sock(xprt, transport, | 1977 | sock = xs_create_sock(xprt, transport, |
@@ -1985,6 +1990,7 @@ static void xs_udp_setup_socket(struct work_struct *work) | |||
1985 | out: | 1990 | out: |
1986 | xprt_clear_connecting(xprt); | 1991 | xprt_clear_connecting(xprt); |
1987 | xprt_wake_pending_tasks(xprt, status); | 1992 | xprt_wake_pending_tasks(xprt, status); |
1993 | current->flags &= ~PF_FSTRANS; | ||
1988 | } | 1994 | } |
1989 | 1995 | ||
1990 | /* | 1996 | /* |
@@ -2110,6 +2116,8 @@ static void xs_tcp_setup_socket(struct work_struct *work) | |||
2110 | if (xprt->shutdown) | 2116 | if (xprt->shutdown) |
2111 | goto out; | 2117 | goto out; |
2112 | 2118 | ||
2119 | current->flags |= PF_FSTRANS; | ||
2120 | |||
2113 | if (!sock) { | 2121 | if (!sock) { |
2114 | clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); | 2122 | clear_bit(XPRT_CONNECTION_ABORT, &xprt->state); |
2115 | sock = xs_create_sock(xprt, transport, | 2123 | sock = xs_create_sock(xprt, transport, |
@@ -2159,6 +2167,7 @@ static void xs_tcp_setup_socket(struct work_struct *work) | |||
2159 | case -EINPROGRESS: | 2167 | case -EINPROGRESS: |
2160 | case -EALREADY: | 2168 | case -EALREADY: |
2161 | xprt_clear_connecting(xprt); | 2169 | xprt_clear_connecting(xprt); |
2170 | current->flags &= ~PF_FSTRANS; | ||
2162 | return; | 2171 | return; |
2163 | case -EINVAL: | 2172 | case -EINVAL: |
2164 | /* Happens, for instance, if the user specified a link | 2173 | /* Happens, for instance, if the user specified a link |
@@ -2171,6 +2180,7 @@ out_eagain: | |||
2171 | out: | 2180 | out: |
2172 | xprt_clear_connecting(xprt); | 2181 | xprt_clear_connecting(xprt); |
2173 | xprt_wake_pending_tasks(xprt, status); | 2182 | xprt_wake_pending_tasks(xprt, status); |
2183 | current->flags &= ~PF_FSTRANS; | ||
2174 | } | 2184 | } |
2175 | 2185 | ||
2176 | /** | 2186 | /** |