From: Pavel Emelyanov <xemul@openvz.org> Date: Wed, 2 Nov 2011 20:38:42 +0000 (-0700) Subject: procfs: report EISDIR when reading sysctl dirs in proc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=887df07891de0435c25cffb92268fea2c621f99c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git procfs: report EISDIR when reading sysctl dirs in proc 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> --- diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 1a77dbef226f..dacd840a675a 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -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, };