diff options
Diffstat (limited to 'net/core/request_sock.c')
-rw-r--r-- | net/core/request_sock.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/core/request_sock.c b/net/core/request_sock.c index cdc0ddd9ac9f..87b22c0bc08c 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c | |||
@@ -58,14 +58,14 @@ int reqsk_queue_alloc(struct request_sock_queue *queue, | |||
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | 59 | ||
60 | get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd)); | 60 | get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd)); |
61 | rwlock_init(&queue->syn_wait_lock); | 61 | spin_lock_init(&queue->syn_wait_lock); |
62 | queue->rskq_accept_head = NULL; | 62 | queue->rskq_accept_head = NULL; |
63 | lopt->nr_table_entries = nr_table_entries; | 63 | lopt->nr_table_entries = nr_table_entries; |
64 | lopt->max_qlen_log = ilog2(nr_table_entries); | 64 | lopt->max_qlen_log = ilog2(nr_table_entries); |
65 | 65 | ||
66 | write_lock_bh(&queue->syn_wait_lock); | 66 | spin_lock_bh(&queue->syn_wait_lock); |
67 | queue->listen_opt = lopt; | 67 | queue->listen_opt = lopt; |
68 | write_unlock_bh(&queue->syn_wait_lock); | 68 | spin_unlock_bh(&queue->syn_wait_lock); |
69 | 69 | ||
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
@@ -81,10 +81,10 @@ static inline struct listen_sock *reqsk_queue_yank_listen_sk( | |||
81 | { | 81 | { |
82 | struct listen_sock *lopt; | 82 | struct listen_sock *lopt; |
83 | 83 | ||
84 | write_lock_bh(&queue->syn_wait_lock); | 84 | spin_lock_bh(&queue->syn_wait_lock); |
85 | lopt = queue->listen_opt; | 85 | lopt = queue->listen_opt; |
86 | queue->listen_opt = NULL; | 86 | queue->listen_opt = NULL; |
87 | write_unlock_bh(&queue->syn_wait_lock); | 87 | spin_unlock_bh(&queue->syn_wait_lock); |
88 | 88 | ||
89 | return lopt; | 89 | return lopt; |
90 | } | 90 | } |
@@ -100,7 +100,7 @@ void reqsk_queue_destroy(struct request_sock_queue *queue) | |||
100 | for (i = 0; i < lopt->nr_table_entries; i++) { | 100 | for (i = 0; i < lopt->nr_table_entries; i++) { |
101 | struct request_sock *req; | 101 | struct request_sock *req; |
102 | 102 | ||
103 | write_lock_bh(&queue->syn_wait_lock); | 103 | spin_lock_bh(&queue->syn_wait_lock); |
104 | while ((req = lopt->syn_table[i]) != NULL) { | 104 | while ((req = lopt->syn_table[i]) != NULL) { |
105 | lopt->syn_table[i] = req->dl_next; | 105 | lopt->syn_table[i] = req->dl_next; |
106 | atomic_inc(&lopt->qlen_dec); | 106 | atomic_inc(&lopt->qlen_dec); |
@@ -108,7 +108,7 @@ void reqsk_queue_destroy(struct request_sock_queue *queue) | |||
108 | reqsk_put(req); | 108 | reqsk_put(req); |
109 | reqsk_put(req); | 109 | reqsk_put(req); |
110 | } | 110 | } |
111 | write_unlock_bh(&queue->syn_wait_lock); | 111 | spin_unlock_bh(&queue->syn_wait_lock); |
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||