diff options
author | Zhu Yi <yi.zhu@intel.com> | 2010-03-07 11:21:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-08 13:45:26 -0500 |
commit | 4045635318538d3ddd2007720412fdc4b08f6a62 (patch) | |
tree | ee358afe884cd8e8af594de4ea882879bd1ff994 | |
parent | 10cc2b50eb4b01ca4dc014af2094d28b4ebe20d7 (diff) |
net: add __must_check to sk_add_backlog
Add the "__must_check" tag to sk_add_backlog() so that any failure to
check and drop packets will be warned about.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/sock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 170353dd9570..092b0551e77f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -604,7 +604,7 @@ static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
604 | } | 604 | } |
605 | 605 | ||
606 | /* The per-socket spinlock must be held here. */ | 606 | /* The per-socket spinlock must be held here. */ |
607 | static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb) | 607 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
608 | { | 608 | { |
609 | if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) | 609 | if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) |
610 | return -ENOBUFS; | 610 | return -ENOBUFS; |