Skip to contentSkip to conversation

SCTP: Move sysctl_sctp_[rw]mem definitions to protocol.c

PATCH Applied Vlad Yasevich 2 participants 2 messages Sep 13, 2007 – Sep 16, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCTP: Move sysctl_sctp_[rw]mem definitions to protocol.c

The sctp_[rw]mem definitions should really be in protocol.c since that is where they are initialized. This also allows one to build a kernel without sysctl support.

---
 net/sctp/protocol.c |    6 +++---
 net/sctp/sysctl.c   |   11 +++--------
 2 files changed, 6 insertions(+), 11 deletions(-)
net/sctp/protocol.c +3 -3
index 193835d..c49eb99 100644
@@ -84,9 +84,9 @@ static struct sctp_af *sctp_af_v6_specific;
 struct kmem_cache *sctp_chunk_cachep __read_mostly;
 struct kmem_cache *sctp_bucket_cachep __read_mostly;
 
-extern int sysctl_sctp_mem[3];
-extern int sysctl_sctp_rmem[3];
-extern int sysctl_sctp_wmem[3];
+int sysctl_sctp_mem[3];
+int sysctl_sctp_rmem[3];
+int sysctl_sctp_wmem[3];
 
 /* Return the address of the control sock. */
 struct sock *sctp_get_ctl_sock(void)
net/sctp/sysctl.c +3 -8
index ba75ef4..39b10ee 100644
@@ -52,14 +52,9 @@ static int int_max = INT_MAX;
 static long sack_timer_min = 1;
 static long sack_timer_max = 500;
 
-int sysctl_sctp_mem[3];
-int sysctl_sctp_rmem[3];
-int sysctl_sctp_wmem[3];
-
-/*
- * per assoc memory limitationf for sends
- */
-int sysctl_sctp_wmem[3];
+extern int sysctl_sctp_mem[3];
+extern int sysctl_sctp_rmem[3];
+extern int sysctl_sctp_wmem[3];
 
 static ctl_table sctp_table[] = {
 	{
Signature · 1 line
1.5.2.4
maintainer Applied
#1 lore raw

From: Vlad Yasevich <[email protected]>
Date: Thu, 13 Sep 2007 17:03:45 -0400

Quoted 5 lines

The sctp_[rw]mem definitions should really be in protocol.c since that is where they are initialized. This also allows one to build a kernel without sysctl support.

Applied to net-2.6.24, thanks Vlad.