diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 90c65cb091a..75b0e97ed93 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1273,11 +1273,22 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | |||
1273 | * This routine must be called with interrupts disabled or with the socket | 1273 | * This routine must be called with interrupts disabled or with the socket |
1274 | * locked so that the sk_buff queue operation is ok. | 1274 | * locked so that the sk_buff queue operation is ok. |
1275 | */ | 1275 | */ |
1276 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) | 1276 | #ifdef CONFIG_NET_DMA |
1277 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) | ||
1278 | { | ||
1279 | __skb_unlink(skb, &sk->sk_receive_queue); | ||
1280 | if (!copied_early) | ||
1281 | __kfree_skb(skb); | ||
1282 | else | ||
1283 | __skb_queue_tail(&sk->sk_async_wait_queue, skb); | ||
1284 | } | ||
1285 | #else | ||
1286 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) | ||
1277 | { | 1287 | { |
1278 | __skb_unlink(skb, &sk->sk_receive_queue); | 1288 | __skb_unlink(skb, &sk->sk_receive_queue); |
1279 | __kfree_skb(skb); | 1289 | __kfree_skb(skb); |
1280 | } | 1290 | } |
1291 | #endif | ||
1281 | 1292 | ||
1282 | extern void sock_enable_timestamp(struct sock *sk); | 1293 | extern void sock_enable_timestamp(struct sock *sk); |
1283 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); | 1294 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); |