Commit 887df078 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Linus Torvalds

procfs: report EISDIR when reading sysctl dirs in proc

On reading sysctl dirs we should return -EISDIR instead of -EINVAL.
Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 89e8a244
...@@ -370,6 +370,7 @@ static const struct file_operations proc_sys_file_operations = { ...@@ -370,6 +370,7 @@ static const struct file_operations proc_sys_file_operations = {
}; };
static const struct file_operations proc_sys_dir_file_operations = { static const struct file_operations proc_sys_dir_file_operations = {
.read = generic_read_dir,
.readdir = proc_sys_readdir, .readdir = proc_sys_readdir,
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment