From 98fabbd0c0b6fa41ff1330c86bc3704139b29907 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sat, 7 Jan 2012 06:57:47 -0800 Subject: [PATCH] --- yaml --- r: 295453 b: refs/heads/master c: 3cc3e04636d603778d921854b84ae7bd34a349a2 h: refs/heads/master i: 295451: e501e8643234d0c3da9126b8b7172f44a321c591 v: v3 --- [refs] | 2 +- trunk/fs/proc/proc_sysctl.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a7093fdc8d3e..f1f8d28d4f10 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8d6ecfcc014332fd2fe933f64194160f0e3a6696 +refs/heads/master: 3cc3e04636d603778d921854b84ae7bd34a349a2 diff --git a/trunk/fs/proc/proc_sysctl.c b/trunk/fs/proc/proc_sysctl.c index e573f9b4f22e..15444850b3e8 100644 --- a/trunk/fs/proc/proc_sysctl.c +++ b/trunk/fs/proc/proc_sysctl.c @@ -267,10 +267,10 @@ static struct ctl_table *find_in_table(struct ctl_table *p, struct qstr *name) static struct ctl_table_header *grab_header(struct inode *inode) { - if (PROC_I(inode)->sysctl) - return sysctl_head_grab(PROC_I(inode)->sysctl); - else - return sysctl_head_next(NULL); + struct ctl_table_header *head = PROC_I(inode)->sysctl; + if (!head) + head = &root_table_header; + return sysctl_head_grab(head); } static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,