From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: [PATCH] fs, proc: Report EISDIR when reading sysctl dirs in proc Date: Fri, 5 Aug 2011 15:10:44 +0400 Message-ID: <20110805111044.GA19352@sun> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Pavel Emelyanov , LINUXFS-ML To: Alexey Dobriyan , Al Viro Return-path: Received: from mail-ew0-f46.google.com ([209.85.215.46]:40742 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751867Ab1HELKt (ORCPT ); Fri, 5 Aug 2011 07:10:49 -0400 Received: by ewy4 with SMTP id 4so1304786ewy.19 for ; Fri, 05 Aug 2011 04:10:47 -0700 (PDT) Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Pavel Emelyanov On reading sysctl dirs we should return -EISDIR instead of -EINVAL. Signed-off-by: Pavel Emelyanov Signed-off-by: Cyrill Gorcunov --- fs/proc/proc_sysctl.c | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6.git/fs/proc/proc_sysctl.c =================================================================== --- linux-2.6.git.orig/fs/proc/proc_sysctl.c +++ linux-2.6.git/fs/proc/proc_sysctl.c @@ -370,6 +370,7 @@ static const struct file_operations proc }; static const struct file_operations proc_sys_dir_file_operations = { + .read = generic_read_dir, .readdir = proc_sys_readdir, .llseek = generic_file_llseek, };