mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
sunrpc: Propagate errors from xs_bind() through xs_create_sock()
xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded error, but it currently returns 0 if xs_bind() fails. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Cc: stable@kernel.org [v2.6.37] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
3fa0b4e201
commit
4cea288aaf
@ -1631,7 +1631,8 @@ static struct socket *xs_create_sock(struct rpc_xprt *xprt,
|
||||
}
|
||||
xs_reclassify_socket(family, sock);
|
||||
|
||||
if (xs_bind(transport, sock)) {
|
||||
err = xs_bind(transport, sock);
|
||||
if (err) {
|
||||
sock_release(sock);
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user