procfs: return ENOENT on opening a being-removed proc entry
authorDaisuke Ogino <ogino.daisuke@jp.fujitsu.com>
Tue, 26 Jul 2011 23:08:37 +0000 (16:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2011 23:49:43 +0000 (16:49 -0700)
commit49ec449223ef67c09978074b752c5a146b870187
tree6e008e65884e991c8696de2862166b7a0d603e06
parent41d2ddbd41de6f8d522659b4588aff618381db51
procfs: return ENOENT on opening a being-removed proc entry

Change 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") when the corresponding device is being
hot-removed.

Signed-off-by: Daisuke Ogino <ogino.daisuke@jp.fujitsu.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/inode.c