Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3a858ff authored by Zhu Yi's avatar Zhu Yi Committed by David S. Miller
Browse files

net: backlog functions rename



sk_add_backlog -> __sk_add_backlog
sk_add_backlog_limited -> sk_add_backlog

Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2499849e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -592,7 +592,7 @@ static inline int sk_stream_memory_free(struct sock *sk)
}

/* OOB backlog add */
static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
	if (!sk->sk_backlog.tail) {
		sk->sk_backlog.head = sk->sk_backlog.tail = skb;
@@ -604,12 +604,12 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
}

/* The per-socket spinlock must be held here. */
static inline int sk_add_backlog_limited(struct sock *sk, struct sk_buff *skb)
static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
	if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
		return -ENOBUFS;

	sk_add_backlog(sk, skb);
	__sk_add_backlog(sk, skb);
	sk->sk_backlog.len += skb->truesize;
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
		rc = sk_backlog_rcv(sk, skb);

		mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
	} else if (sk_add_backlog_limited(sk, skb)) {
	} else if (sk_add_backlog(sk, skb)) {
		bh_unlock_sock(sk);
		atomic_inc(&sk->sk_drops);
		goto discard_and_relse;
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ int dccp_child_process(struct sock *parent, struct sock *child,
		 * in main socket hash table and lock on listening
		 * socket does not protect us more.
		 */
		sk_add_backlog(child, skb);
		__sk_add_backlog(child, skb);
	}

	bh_unlock_sock(child);
+1 −1
Original line number Diff line number Diff line
@@ -1682,7 +1682,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
			if (!tcp_prequeue(sk, skb))
				ret = tcp_v4_do_rcv(sk, skb);
		}
	} else if (sk_add_backlog_limited(sk, skb)) {
	} else if (sk_add_backlog(sk, skb)) {
		bh_unlock_sock(sk);
		goto discard_and_relse;
	}
+1 −1
Original line number Diff line number Diff line
@@ -728,7 +728,7 @@ int tcp_child_process(struct sock *parent, struct sock *child,
		 * in main socket hash table and lock on listening
		 * socket does not protect us more.
		 */
		sk_add_backlog(child, skb);
		__sk_add_backlog(child, skb);
	}

	bh_unlock_sock(child);
Loading