Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295455
b: refs/heads/master
c: e0d0452
h: refs/heads/master
i:
  295453: 98fabbd
  295451: e501e86
  295447: e454573
  295439: d1f76c2
  295423: 1e980cc
v: v3
  • Loading branch information
Eric W. Biederman committed Jan 25, 2012
1 parent 86077f1 commit 425aeb6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 938aaa4f9249aa1519fd0db07fc72125de2df338
refs/heads/master: e0d045290a8454ecd7f63c78c10d412f35d6ef94
25 changes: 17 additions & 8 deletions trunk/fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ static struct ctl_table_root sysctl_table_root = {

static DEFINE_SPINLOCK(sysctl_lock);

static void init_header(struct ctl_table_header *head,
struct ctl_table_root *root, struct ctl_table_set *set,
struct ctl_table *table)
{
head->ctl_table_arg = table;
INIT_LIST_HEAD(&head->ctl_entry);
head->used = 0;
head->count = 1;
head->nreg = 1;
head->unregistering = NULL;
head->root = root;
head->set = set;
head->parent = NULL;
}

/* called under sysctl_lock */
static int use_table(struct ctl_table_header *p)
{
Expand Down Expand Up @@ -932,14 +947,8 @@ struct ctl_table_header *__register_sysctl_table(
new_name += namelen + 1;
}
*prevp = table;
header->ctl_table_arg = table;

INIT_LIST_HEAD(&header->ctl_entry);
header->used = 0;
header->unregistering = NULL;
header->root = root;
header->count = 1;
header->nreg = 1;

init_header(header, root, NULL, table);
if (sysctl_check_table(path, table))
goto fail;

Expand Down

0 comments on commit 425aeb6

Please sign in to comment.