diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:39:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:39:50 -0400 |
commit | 4c7145a1ec1bb789d5f07e47510e8bda546a7c4a (patch) | |
tree | e2767b77e5413473a3bba302237f4669a203f183 /include/net/sock.h | |
parent | 74e91604b2452c15bbe72d77b37cf47ed0310d13 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/spinlocks
Done to prevent this failure of an Octopus merge:
Added arch/arm/include/asm/byteorder.h in both, but differently.
ERROR: Merge conflict in arch/arm/include/asm/byteorder.h
Auto-merging include/asm-x86/spinlock.h
ERROR: Merge conflict in include/asm-x86/spinlock.h
fatal: merge program failed
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 06c5259aff30..ada50c04d09f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -482,6 +482,11 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
482 | skb->next = NULL; | 482 | skb->next = NULL; |
483 | } | 483 | } |
484 | 484 | ||
485 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) | ||
486 | { | ||
487 | return sk->sk_backlog_rcv(sk, skb); | ||
488 | } | ||
489 | |||
485 | #define sk_wait_event(__sk, __timeo, __condition) \ | 490 | #define sk_wait_event(__sk, __timeo, __condition) \ |
486 | ({ int __rc; \ | 491 | ({ int __rc; \ |
487 | release_sock(__sk); \ | 492 | release_sock(__sk); \ |
@@ -532,6 +537,7 @@ struct proto { | |||
532 | int (*getsockopt)(struct sock *sk, int level, | 537 | int (*getsockopt)(struct sock *sk, int level, |
533 | int optname, char __user *optval, | 538 | int optname, char __user *optval, |
534 | int __user *option); | 539 | int __user *option); |
540 | #ifdef CONFIG_COMPAT | ||
535 | int (*compat_setsockopt)(struct sock *sk, | 541 | int (*compat_setsockopt)(struct sock *sk, |
536 | int level, | 542 | int level, |
537 | int optname, char __user *optval, | 543 | int optname, char __user *optval, |
@@ -540,6 +546,7 @@ struct proto { | |||
540 | int level, | 546 | int level, |
541 | int optname, char __user *optval, | 547 | int optname, char __user *optval, |
542 | int __user *option); | 548 | int __user *option); |
549 | #endif | ||
543 | int (*sendmsg)(struct kiocb *iocb, struct sock *sk, | 550 | int (*sendmsg)(struct kiocb *iocb, struct sock *sk, |
544 | struct msghdr *msg, size_t len); | 551 | struct msghdr *msg, size_t len); |
545 | int (*recvmsg)(struct kiocb *iocb, struct sock *sk, | 552 | int (*recvmsg)(struct kiocb *iocb, struct sock *sk, |
@@ -1322,6 +1329,18 @@ static inline void sk_change_net(struct sock *sk, struct net *net) | |||
1322 | sock_net_set(sk, hold_net(net)); | 1329 | sock_net_set(sk, hold_net(net)); |
1323 | } | 1330 | } |
1324 | 1331 | ||
1332 | static inline struct sock *skb_steal_sock(struct sk_buff *skb) | ||
1333 | { | ||
1334 | if (unlikely(skb->sk)) { | ||
1335 | struct sock *sk = skb->sk; | ||
1336 | |||
1337 | skb->destructor = NULL; | ||
1338 | skb->sk = NULL; | ||
1339 | return sk; | ||
1340 | } | ||
1341 | return NULL; | ||
1342 | } | ||
1343 | |||
1325 | extern void sock_enable_timestamp(struct sock *sk); | 1344 | extern void sock_enable_timestamp(struct sock *sk); |
1326 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); | 1345 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); |
1327 | extern int sock_get_timestampns(struct sock *, struct timespec __user *); | 1346 | extern int sock_get_timestampns(struct sock *, struct timespec __user *); |