]> 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, 5 Oct 2011 00:43:52 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Oct 2011 06:07:04 +0000 (17:07 +1100)
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>
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,
 };