From: Daisuke Ogino <ogino.daisuke@jp.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org, linux-fsdevel@vger.kernel.org,
jbarnes@virtuousgeek.org, hch@infradead.org,
akpm@linux-foundation.org, adobriyan@gmail.com
Subject: Re: [patch] procfs: returns ENOENT on opening the being-removed proc entry
Date: Thu, 30 Jun 2011 19:44:21 +0900 [thread overview]
Message-ID: <20110630193941.8569.371AB99A@jp.fujitsu.com> (raw)
In-Reply-To: <20110627101944.b53cb3f0.kamezawa.hiroyu@jp.fujitsu.com>
Hello.
Though I posted the following patch a week ago,
there is no objection, and Kame-san reviewed it.
I hope merge it by someone if possible.
(I don't find maintainer's name for procfs.)
---
I changed the return value to ENOENT.
This return value is then returned when opening the proc entry
that have been removed.
For example, open("/proc/bus/pci/XX/YY") during the corresponding
device is being hot-removed.
Signed-off-by: Daisuke Ogino <ogino.daisuke@jp.fujitsu.com>
---
fs/proc/inode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 74b48cf..7ed72d6 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -319,7 +319,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
if (!pde->proc_fops) {
spin_unlock(&pde->pde_unload_lock);
kfree(pdeo);
- return -EINVAL;
+ return -ENOENT;
}
pde->pde_users++;
open = pde->proc_fops->open;
--
Thanks.
--
Daisuke Ogino
prev parent reply other threads:[~2011-06-30 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 1:48 "FJCL) 荻野 大輔"
2011-06-27 1:19 ` KAMEZAWA Hiroyuki
2011-06-30 10:44 ` Daisuke Ogino [this message]
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=20110630193941.8569.371AB99A@jp.fujitsu.com \
--to=ogino.daisuke@jp.fujitsu.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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
all inboxes | Powered by JetHome®