diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index cb46d0156840..6ccb6cc19e28 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1244,7 +1244,6 @@ int do_sysctl_strategy (ctl_table *table, | |||
1244 | /** | 1244 | /** |
1245 | * register_sysctl_table - register a sysctl hierarchy | 1245 | * register_sysctl_table - register a sysctl hierarchy |
1246 | * @table: the top-level table structure | 1246 | * @table: the top-level table structure |
1247 | * @insert_at_head: whether the entry should be inserted in front or at the end | ||
1248 | * | 1247 | * |
1249 | * Register a sysctl table hierarchy. @table should be a filled in ctl_table | 1248 | * Register a sysctl table hierarchy. @table should be a filled in ctl_table |
1250 | * array. An entry with a ctl_name of 0 terminates the table. | 1249 | * array. An entry with a ctl_name of 0 terminates the table. |
@@ -1310,8 +1309,7 @@ int do_sysctl_strategy (ctl_table *table, | |||
1310 | * This routine returns %NULL on a failure to register, and a pointer | 1309 | * This routine returns %NULL on a failure to register, and a pointer |
1311 | * to the table header on success. | 1310 | * to the table header on success. |
1312 | */ | 1311 | */ |
1313 | struct ctl_table_header *register_sysctl_table(ctl_table * table, | 1312 | struct ctl_table_header *register_sysctl_table(ctl_table * table) |
1314 | int insert_at_head) | ||
1315 | { | 1313 | { |
1316 | struct ctl_table_header *tmp; | 1314 | struct ctl_table_header *tmp; |
1317 | tmp = kmalloc(sizeof(struct ctl_table_header), GFP_KERNEL); | 1315 | tmp = kmalloc(sizeof(struct ctl_table_header), GFP_KERNEL); |
@@ -1322,10 +1320,7 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table, | |||
1322 | tmp->used = 0; | 1320 | tmp->used = 0; |
1323 | tmp->unregistering = NULL; | 1321 | tmp->unregistering = NULL; |
1324 | spin_lock(&sysctl_lock); | 1322 | spin_lock(&sysctl_lock); |
1325 | if (insert_at_head) | 1323 | list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry); |
1326 | list_add(&tmp->ctl_entry, &root_table_header.ctl_entry); | ||
1327 | else | ||
1328 | list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry); | ||
1329 | spin_unlock(&sysctl_lock); | 1324 | spin_unlock(&sysctl_lock); |
1330 | #ifdef CONFIG_PROC_SYSCTL | 1325 | #ifdef CONFIG_PROC_SYSCTL |
1331 | register_proc_table(table, proc_sys_root, tmp); | 1326 | register_proc_table(table, proc_sys_root, tmp); |