diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dst.h | 2 | ||||
-rw-r--r-- | include/net/inet_hashtables.h | 6 | ||||
-rw-r--r-- | include/net/neighbour.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_expect.h | 2 | ||||
-rw-r--r-- | include/net/request_sock.h | 4 | ||||
-rw-r--r-- | include/net/sock.h | 21 | ||||
-rw-r--r-- | include/net/timewait_sock.h | 2 |
7 files changed, 29 insertions, 10 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index e156e38e4ac3..62b7e7598e9a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -98,7 +98,7 @@ struct dst_ops | |||
98 | int entry_size; | 98 | int entry_size; |
99 | 99 | ||
100 | atomic_t entries; | 100 | atomic_t entries; |
101 | kmem_cache_t *kmem_cachep; | 101 | struct kmem_cache *kmem_cachep; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | #ifdef __KERNEL__ | 104 | #ifdef __KERNEL__ |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index a9eb2eaf094e..34cc76e3ddb4 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -125,7 +125,7 @@ struct inet_hashinfo { | |||
125 | rwlock_t lhash_lock ____cacheline_aligned; | 125 | rwlock_t lhash_lock ____cacheline_aligned; |
126 | atomic_t lhash_users; | 126 | atomic_t lhash_users; |
127 | wait_queue_head_t lhash_wait; | 127 | wait_queue_head_t lhash_wait; |
128 | kmem_cache_t *bind_bucket_cachep; | 128 | struct kmem_cache *bind_bucket_cachep; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static inline struct inet_ehash_bucket *inet_ehash_bucket( | 131 | static inline struct inet_ehash_bucket *inet_ehash_bucket( |
@@ -136,10 +136,10 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket( | |||
136 | } | 136 | } |
137 | 137 | ||
138 | extern struct inet_bind_bucket * | 138 | extern struct inet_bind_bucket * |
139 | inet_bind_bucket_create(kmem_cache_t *cachep, | 139 | inet_bind_bucket_create(struct kmem_cache *cachep, |
140 | struct inet_bind_hashbucket *head, | 140 | struct inet_bind_hashbucket *head, |
141 | const unsigned short snum); | 141 | const unsigned short snum); |
142 | extern void inet_bind_bucket_destroy(kmem_cache_t *cachep, | 142 | extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, |
143 | struct inet_bind_bucket *tb); | 143 | struct inet_bind_bucket *tb); |
144 | 144 | ||
145 | static inline int inet_bhashfn(const __u16 lport, const int bhash_size) | 145 | static inline int inet_bhashfn(const __u16 lport, const int bhash_size) |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index c8aacbd2e333..23967031ddb7 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -160,7 +160,7 @@ struct neigh_table | |||
160 | atomic_t entries; | 160 | atomic_t entries; |
161 | rwlock_t lock; | 161 | rwlock_t lock; |
162 | unsigned long last_rand; | 162 | unsigned long last_rand; |
163 | kmem_cache_t *kmem_cachep; | 163 | struct kmem_cache *kmem_cachep; |
164 | struct neigh_statistics *stats; | 164 | struct neigh_statistics *stats; |
165 | struct neighbour **hash_buckets; | 165 | struct neighbour **hash_buckets; |
166 | unsigned int hash_mask; | 166 | unsigned int hash_mask; |
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index cef3136e22a3..41bcc9eb4206 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <net/netfilter/nf_conntrack.h> | 7 | #include <net/netfilter/nf_conntrack.h> |
8 | 8 | ||
9 | extern struct list_head nf_conntrack_expect_list; | 9 | extern struct list_head nf_conntrack_expect_list; |
10 | extern kmem_cache_t *nf_conntrack_expect_cachep; | 10 | extern struct kmem_cache *nf_conntrack_expect_cachep; |
11 | extern struct file_operations exp_file_ops; | 11 | extern struct file_operations exp_file_ops; |
12 | 12 | ||
13 | struct nf_conntrack_expect | 13 | struct nf_conntrack_expect |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index e37baaf2080b..7aed02ce2b65 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -29,7 +29,7 @@ struct proto; | |||
29 | struct request_sock_ops { | 29 | struct request_sock_ops { |
30 | int family; | 30 | int family; |
31 | int obj_size; | 31 | int obj_size; |
32 | kmem_cache_t *slab; | 32 | struct kmem_cache *slab; |
33 | int (*rtx_syn_ack)(struct sock *sk, | 33 | int (*rtx_syn_ack)(struct sock *sk, |
34 | struct request_sock *req, | 34 | struct request_sock *req, |
35 | struct dst_entry *dst); | 35 | struct dst_entry *dst); |
@@ -60,7 +60,7 @@ struct request_sock { | |||
60 | 60 | ||
61 | static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops) | 61 | static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops) |
62 | { | 62 | { |
63 | struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC); | 63 | struct request_sock *req = kmem_cache_alloc(ops->slab, GFP_ATOMIC); |
64 | 64 | ||
65 | if (req != NULL) | 65 | if (req != NULL) |
66 | req->rsk_ops = ops; | 66 | req->rsk_ops = ops; |
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) |
diff --git a/include/net/timewait_sock.h b/include/net/timewait_sock.h index d7a306ea560d..1e1ee3253fd8 100644 --- a/include/net/timewait_sock.h +++ b/include/net/timewait_sock.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <net/sock.h> | 15 | #include <net/sock.h> |
16 | 16 | ||
17 | struct timewait_sock_ops { | 17 | struct timewait_sock_ops { |
18 | kmem_cache_t *twsk_slab; | 18 | struct kmem_cache *twsk_slab; |
19 | unsigned int twsk_obj_size; | 19 | unsigned int twsk_obj_size; |
20 | int (*twsk_unique)(struct sock *sk, | 20 | int (*twsk_unique)(struct sock *sk, |
21 | struct sock *sktw, void *twp); | 21 | struct sock *sktw, void *twp); |