Skip to content

Commit

Permalink
procfs: report EISDIR when reading sysctl dirs in proc
Browse files Browse the repository at this point in the history
On reading sysctl dirs we should return -EISDIR instead of -EINVAL.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Nov 2, 2011
1 parent 89e8a24 commit 887df07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ static const struct file_operations proc_sys_file_operations = {
};

static const struct file_operations proc_sys_dir_file_operations = {
.read = generic_read_dir,
.readdir = proc_sys_readdir,
.llseek = generic_file_llseek,
};
Expand Down

0 comments on commit 887df07

Please sign in to comment.