linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Alexey Dobriyan <adobriyan@gmail.com>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pavel Emelyanov <xemul@openvz.org>,
	LINUXFS-ML <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] fs, proc: Report EISDIR when reading sysctl dirs in proc
Date: Fri, 5 Aug 2011 15:10:44 +0400	[thread overview]
Message-ID: <20110805111044.GA19352@sun> (raw)

From: Pavel Emelyanov <xemul@openvz.org>

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>
---
 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,
 };

             reply	other threads:[~2011-08-05 11:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 11:10 Cyrill Gorcunov [this message]
2011-08-15  5:55 ` [PATCH] fs, proc: Report EISDIR when reading sysctl dirs in proc Cyrill Gorcunov
2011-08-24  6:26   ` Pavel Emelyanov
2011-08-24  6:30     ` Cyrill Gorcunov
2011-08-24  6:36       ` Pavel Emelyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110805111044.GA19352@sun \
    --to=gorcunov@openvz.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).