projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5296f6d
)
procfs: return ENOENT on opening a being-removed proc entry
author
Daisuke Ogino
<
[email protected]
>
Tue, 26 Jul 2011 23:08:37 +0000
(16:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Jul 2011 23:49:43 +0000
(16:49 -0700)
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 <
[email protected]
>
Cc: Jesse Barnes <
[email protected]
>
Acked-by: Alexey Dobriyan <
[email protected]
>
Cc: Christoph Hellwig <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/inode.c
patch
|
blob
|
history
diff --git
a/fs/proc/inode.c
b/fs/proc/inode.c
index 74b48cfa1bb2d4be464180b6913c6cd28462eb5f..7ed72d6c1c6fc4d2c528e7c5578c2836a2875914 100644
(file)
--- 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 -E
INVAL
;
+ return -E
NOENT
;
}
pde->pde_users++;
open = pde->proc_fops->open;