From: Pavel Emelyanov 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%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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 Signed-off-by: Cyrill Gorcunov Cc: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 1a77dbef226..dacd840a675 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, };