IPVS: Conditionally include sysctl members of struct netns_ipvs
authorSimon Horman <horms@verge.net.au>
Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)
committerSimon Horman <horms@verge.net.au>
Tue, 15 Mar 2011 00:37:02 +0000 (09:37 +0900)
There is now no need to include sysctl members of struct netns_ipvs
unless CONFIG_SYSCTL is defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
include/net/ip_vs.h

index 299aeb53789946aea1a4d73bb184ba223583e412..272f59336b737d804174cbf849e757fa8a4a8bd5 100644 (file)
@@ -839,6 +839,17 @@ struct netns_ipvs {
        struct ip_vs_stats              tot_stats;  /* Statistics & est. */
 
        int                     num_services;    /* no of virtual services */
+
+       rwlock_t                rs_lock;         /* real services table */
+       /* semaphore for IPVS sockopts. And, [gs]etsockopt may sleep. */
+       struct lock_class_key   ctl_key;        /* ctl_mutex debuging */
+       /* Trash for destinations */
+       struct list_head        dest_trash;
+       /* Service counters */
+       atomic_t                ftpsvc_counter;
+       atomic_t                nullsvc_counter;
+
+#ifdef CONFIG_SYSCTL
        /* 1/rate drop and drop-entry variables */
        struct delayed_work     defense_work;   /* Work handler */
        int                     drop_rate;
@@ -848,18 +859,12 @@ struct netns_ipvs {
        spinlock_t              dropentry_lock;  /* drop entry handling */
        spinlock_t              droppacket_lock; /* drop packet handling */
        spinlock_t              securetcp_lock;  /* state and timeout tables */
-       rwlock_t                rs_lock;         /* real services table */
-       /* semaphore for IPVS sockopts. And, [gs]etsockopt may sleep. */
-       struct lock_class_key   ctl_key;        /* ctl_mutex debuging */
-       /* Trash for destinations */
-       struct list_head        dest_trash;
-       /* Service counters */
-       atomic_t                ftpsvc_counter;
-       atomic_t                nullsvc_counter;
 
        /* sys-ctl struct */
        struct ctl_table_header *sysctl_hdr;
        struct ctl_table        *sysctl_tbl;
+#endif
+
        /* sysctl variables */
        int                     sysctl_amemthresh;
        int                     sysctl_am_droprate;