diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index fe3a33fad03f..03684e702d13 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -571,7 +571,7 @@ struct proto { | |||
571 | int *sysctl_rmem; | 571 | int *sysctl_rmem; |
572 | int max_header; | 572 | int max_header; |
573 | 573 | ||
574 | kmem_cache_t *slab; | 574 | struct kmem_cache *slab; |
575 | unsigned int obj_size; | 575 | unsigned int obj_size; |
576 | 576 | ||
577 | atomic_t *orphan_count; | 577 | atomic_t *orphan_count; |
@@ -746,6 +746,25 @@ static inline int sk_stream_wmem_schedule(struct sock *sk, int size) | |||
746 | */ | 746 | */ |
747 | #define sock_owned_by_user(sk) ((sk)->sk_lock.owner) | 747 | #define sock_owned_by_user(sk) ((sk)->sk_lock.owner) |
748 | 748 | ||
749 | /* | ||
750 | * Macro so as to not evaluate some arguments when | ||
751 | * lockdep is not enabled. | ||
752 | * | ||
753 | * Mark both the sk_lock and the sk_lock.slock as a | ||
754 | * per-address-family lock class. | ||
755 | */ | ||
756 | #define sock_lock_init_class_and_name(sk, sname, skey, name, key) \ | ||
757 | do { \ | ||
758 | sk->sk_lock.owner = NULL; \ | ||
759 | init_waitqueue_head(&sk->sk_lock.wq); \ | ||
760 | spin_lock_init(&(sk)->sk_lock.slock); \ | ||
761 | debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ | ||
762 | sizeof((sk)->sk_lock)); \ | ||
763 | lockdep_set_class_and_name(&(sk)->sk_lock.slock, \ | ||
764 | (skey), (sname)); \ | ||
765 | lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ | ||
766 | } while (0) | ||
767 | |||
749 | extern void FASTCALL(lock_sock_nested(struct sock *sk, int subclass)); | 768 | extern void FASTCALL(lock_sock_nested(struct sock *sk, int subclass)); |
750 | 769 | ||
751 | static inline void lock_sock(struct sock *sk) | 770 | static inline void lock_sock(struct sock *sk) |