提交 51f72f4a 编写于 作者: E Eric W. Biederman

sysctl: An easier to read version of find_subdir

Suggested-by: NLucian Adrian Grijincu <lucian.grijincu@gmail.com>
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
上级 1347440d
......@@ -833,9 +833,9 @@ static struct ctl_dir *find_subdir(struct ctl_dir *dir,
entry = find_entry(&head, dir, name, namelen);
if (!entry)
return ERR_PTR(-ENOENT);
if (S_ISDIR(entry->mode))
return container_of(head, struct ctl_dir, header);
return ERR_PTR(-ENOTDIR);
if (!S_ISDIR(entry->mode))
return ERR_PTR(-ENOTDIR);
return container_of(head, struct ctl_dir, header);
}
static struct ctl_dir *new_dir(struct ctl_table_set *set,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册