|
@@ -58,14 +58,14 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
|
|
|
return -ENOMEM;
|
|
|
|
|
|
get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd));
|
|
|
- rwlock_init(&queue->syn_wait_lock);
|
|
|
+ spin_lock_init(&queue->syn_wait_lock);
|
|
|
queue->rskq_accept_head = NULL;
|
|
|
lopt->nr_table_entries = nr_table_entries;
|
|
|
lopt->max_qlen_log = ilog2(nr_table_entries);
|
|
|
|
|
|
- write_lock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_lock_bh(&queue->syn_wait_lock);
|
|
|
queue->listen_opt = lopt;
|
|
|
- write_unlock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_unlock_bh(&queue->syn_wait_lock);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -81,10 +81,10 @@ static inline struct listen_sock *reqsk_queue_yank_listen_sk(
|
|
|
{
|
|
|
struct listen_sock *lopt;
|
|
|
|
|
|
- write_lock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_lock_bh(&queue->syn_wait_lock);
|
|
|
lopt = queue->listen_opt;
|
|
|
queue->listen_opt = NULL;
|
|
|
- write_unlock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_unlock_bh(&queue->syn_wait_lock);
|
|
|
|
|
|
return lopt;
|
|
|
}
|
|
@@ -100,7 +100,7 @@ void reqsk_queue_destroy(struct request_sock_queue *queue)
|
|
|
for (i = 0; i < lopt->nr_table_entries; i++) {
|
|
|
struct request_sock *req;
|
|
|
|
|
|
- write_lock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_lock_bh(&queue->syn_wait_lock);
|
|
|
while ((req = lopt->syn_table[i]) != NULL) {
|
|
|
lopt->syn_table[i] = req->dl_next;
|
|
|
atomic_inc(&lopt->qlen_dec);
|
|
@@ -108,7 +108,7 @@ void reqsk_queue_destroy(struct request_sock_queue *queue)
|
|
|
reqsk_put(req);
|
|
|
reqsk_put(req);
|
|
|
}
|
|
|
- write_unlock_bh(&queue->syn_wait_lock);
|
|
|
+ spin_unlock_bh(&queue->syn_wait_lock);
|
|
|
}
|
|
|
}
|
|
|
|