From c39d13d3ccae15f99eb50b90aa4a5613fb59af8f Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Sun, 1 Jan 2017 14:54:47 -0500 Subject: [PATCH 1/1] LU-8066 obdclass: Get rid of remaining /proc/sys/lustre plumbing Since all of the variables from /proc/sys/lustre were moved to /sys/fs/lustre, get rid of the remaining infrastructure. Signed-off-by: Oleg Drokin Change-Id: I6facdb8f52b86efb1e85a4d43ca2532a2f460a85 Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/24034 Reviewed-by: Oleg Drokin Tested-by: Oleg Drokin --- lustre/obdclass/linux/linux-sysctl.c | 44 ++++-------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c index 7307dfe..19f95b8 100644 --- a/lustre/obdclass/linux/linux-sysctl.c +++ b/lustre/obdclass/linux/linux-sysctl.c @@ -31,17 +31,13 @@ */ #include -#include #include #include -#include -#include -#include #include #include #include -#include -#include +#include +#include #include #define DEBUG_SUBSYSTEM S_CLASS @@ -50,10 +46,6 @@ #include #include -#ifdef CONFIG_SYSCTL -static struct ctl_table_header *obd_table_header; -#endif - struct static_lustre_uintvalue_attr { struct { struct attribute attr; @@ -96,7 +88,7 @@ static struct static_lustre_uintvalue_attr lustre_sattr_##name = \ {__ATTR(name, 0644, \ static_uintvalue_show, \ static_uintvalue_store),\ - value } + value } LUSTRE_STATIC_UINT_ATTR(timeout, &obd_timeout); @@ -163,24 +155,6 @@ static ssize_t memused_max_show(struct kobject *kobj, struct attribute *attr, } LUSTRE_RO_ATTR(memused_max); -#ifdef CONFIG_SYSCTL -static struct ctl_table obd_table[] = { - { 0 } -}; - -static struct ctl_table parent_table[] = { - { - INIT_CTL_NAME - .procname = "lustre", - .data = NULL, - .maxlen = 0, - .mode = 0555, - .child = obd_table - }, - { 0 } -}; -#endif - static struct attribute *lustre_attrs[] = { &lustre_sattr_timeout.u.attr, &lustre_attr_max_dirty_mb.attr, @@ -207,18 +181,10 @@ static struct attribute_group lustre_attr_group = { int obd_sysctl_init(void) { -#ifdef CONFIG_SYSCTL - if ( !obd_table_header ) - obd_table_header = register_sysctl_table(parent_table); -#endif return sysfs_create_group(lustre_kobj, &lustre_attr_group); } -void obd_sysctl_clean (void) +void obd_sysctl_clean(void) { -#ifdef CONFIG_SYSCTL - if ( obd_table_header ) - unregister_sysctl_table(obd_table_header); - obd_table_header = NULL; -#endif + sysfs_remove_group(lustre_kobj, &lustre_attr_group); } -- 1.8.3.1