]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
procfs: report EISDIR when reading sysctl dirs in proc
authorPavel Emelyanov <xemul@openvz.org>
Wed, 28 Sep 2011 00:50:58 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:46 +0000 (14:53 +1000)
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 <>
fs/proc/proc_sysctl.c

index 1435ef5e94ca15de25637fb5e8e79f467e7465a1..928afdf91ffdd8a8d408bd40c7d4a3701d994437 100644 (file)
@@ -360,6 +360,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,
 };