Commit 6488fcb0 authored by David S. Miller's avatar David S. Miller

[SCTP]: Use sock_owned_by_user.

parent d0dc914f
......@@ -198,7 +198,6 @@ extern void sctp_hash_digest(const char *secret, const int secret_len,
#define sctp_release_sock(sk) release_sock(sk)
#define sctp_bh_lock_sock(sk) bh_lock_sock(sk)
#define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk)
#define __sctp_sock_busy(sk) ((sk)->lock.users)
#define SCTP_SOCK_SLEEP_PRE(sk) SOCK_SLEEP_PRE(sk)
#define SCTP_SOCK_SLEEP_POST(sk) SOCK_SLEEP_POST(sk)
......
......@@ -229,7 +229,7 @@ int sctp_rcv(struct sk_buff *skb)
*/
sctp_bh_lock_sock(sk);
if (__sctp_sock_busy(sk)) {
if (sock_owned_by_user(sk)) {
sk_add_backlog(sk, (struct sk_buff *) chunk);
} else {
sctp_backlog_rcv(sk, (struct sk_buff *) chunk);
......
......@@ -798,7 +798,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer)
/* Check whether a task is in the sock. */
sctp_bh_lock_sock(asoc->base.sk);
if (__sctp_sock_busy(asoc->base.sk)) {
if (sock_owned_by_user(asoc->base.sk)) {
SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__);
/* Try again later. */
......@@ -837,7 +837,7 @@ static void sctp_generate_timeout_event(sctp_association_t *asoc,
int error = 0;
sctp_bh_lock_sock(asoc->base.sk);
if (__sctp_sock_busy(asoc->base.sk)) {
if (sock_owned_by_user(asoc->base.sk)) {
SCTP_DEBUG_PRINTK("%s:Sock is busy: timer %d\n",
__FUNCTION__,
timeout_type);
......@@ -911,7 +911,7 @@ void sctp_generate_heartbeat_event(unsigned long data)
sctp_association_t *asoc = transport->asoc;
sctp_bh_lock_sock(asoc->base.sk);
if (__sctp_sock_busy(asoc->base.sk)) {
if (sock_owned_by_user(asoc->base.sk)) {
SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__);
/* Try again later. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment