|
@@ -462,9 +462,6 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
|
|
|
|
|
|
err = ERR_PTR(-ENOMEM);
|
|
err = ERR_PTR(-ENOMEM);
|
|
inode = proc_sys_make_inode(dir->i_sb, h ? h : head, p);
|
|
inode = proc_sys_make_inode(dir->i_sb, h ? h : head, p);
|
|
- if (h)
|
|
|
|
- sysctl_head_finish(h);
|
|
|
|
-
|
|
|
|
if (!inode)
|
|
if (!inode)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
@@ -473,6 +470,8 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
|
|
d_add(dentry, inode);
|
|
d_add(dentry, inode);
|
|
|
|
|
|
out:
|
|
out:
|
|
|
|
+ if (h)
|
|
|
|
+ sysctl_head_finish(h);
|
|
sysctl_head_finish(head);
|
|
sysctl_head_finish(head);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|