forked from luck/tmp_suning_uos_patched
smc: fix sendpage() call
The sendpage() call grabs the sock lock before calling the default implementation - which tries to grab it once again. Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>< Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a6920d1d13
commit
bda27ff5c4
|
@ -1315,8 +1315,11 @@ static ssize_t smc_sendpage(struct socket *sock, struct page *page,
|
|||
|
||||
smc = smc_sk(sk);
|
||||
lock_sock(sk);
|
||||
if (sk->sk_state != SMC_ACTIVE)
|
||||
if (sk->sk_state != SMC_ACTIVE) {
|
||||
release_sock(sk);
|
||||
goto out;
|
||||
}
|
||||
release_sock(sk);
|
||||
if (smc->use_fallback)
|
||||
rc = kernel_sendpage(smc->clcsock, page, offset,
|
||||
size, flags);
|
||||
|
@ -1324,7 +1327,6 @@ static ssize_t smc_sendpage(struct socket *sock, struct page *page,
|
|||
rc = sock_no_sendpage(sock, page, offset, size, flags);
|
||||
|
||||
out:
|
||||
release_sock(sk);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user