OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/2][INET] Move the reqsk_queue_yank_listen_sk from header
[PATCH 2/2][INET] Move the reqsk_queue_yank_listen_sk from header [message #23245] Wed, 14 November 2007 18:11 Go to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
This function is used in the net/core/request_sock.c only.
No need in keeping it in the header file.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 0a954ee..e80b53f 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -123,19 +123,6 @@ struct request_sock_queue {
 
 extern int reqsk_queue_alloc(struct request_sock_queue *queue,
 			     unsigned int nr_table_entries);
-
-static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
-{
-	struct listen_sock *lopt;
-
-	write_lock_bh(&queue->syn_wait_lock);
-	lopt = queue->listen_opt;
-	queue->listen_opt = NULL;
-	write_unlock_bh(&queue->syn_wait_lock);
-
-	return lopt;
-}
-
 extern void __reqsk_queue_destroy(struct request_sock_queue *queue);
 extern void reqsk_queue_destroy(struct request_sock_queue *queue);
 
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 12a15f5..16b2ef0 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -71,6 +71,19 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
 
 EXPORT_SYMBOL(reqsk_queue_alloc);
 
+static struct listen_sock *reqsk_queue_yank_listen_sk(
+		struct request_sock_queue *queue)
+{
+	struct listen_sock *lopt;
+
+	write_lock_bh(&queue->syn_wait_lock);
+	lopt = queue->listen_opt;
+	queue->listen_opt = NULL;
+	write_unlock_bh(&queue->syn_wait_lock);
+
+	return lopt;
+}
+
 void __reqsk_queue_destroy(struct request_sock_queue *queue)
 {
 	struct listen_sock *lopt = reqsk_queue_yank_listen_sk(queue);
-- 
1.5.3.4
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH 1/2][INET] Fix potential kfree on vmalloc-ed area of request_sock_queue
Next Topic: [PATCH 2/2][INET] (resend) Move the reqsk_queue_yank_listen_sk from header
Goto Forum:
  


Current Time: Sat Sep 06 13:54:40 GMT 2025

Total time taken to generate the page: 0.16207 seconds