diff options
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 | /** |