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:
2aa362c
)
proc: return -ENOMEM when inode allocation failed
author
yan
<
[email protected]
>
Fri, 5 Oct 2012 00:15:38 +0000
(17:15 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 5 Oct 2012 18:05:17 +0000
(
03:05
+0900)
If proc_get_inode() returns NULL then presumably it encountered memory
exhaustion. proc_lookup_de() should return -ENOMEM in this case, not
-EINVAL.
Signed-off-by: yan <
[email protected]
>
Cc: Ryan Mallon <
[email protected]
>
Cc: Cong Wang <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/generic.c
patch
|
blob
|
history
diff --git
a/fs/proc/generic.c
b/fs/proc/generic.c
index b3647fe6a60870e55f36710497fd9dff583963ee..9e8f631643094a4e82c410c3d1ae5194b2dbe8e5 100644
(file)
--- a/
fs/proc/generic.c
+++ b/
fs/proc/generic.c
@@
-427,7
+427,7
@@
struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir,
if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
pde_get(de);
spin_unlock(&proc_subdir_lock);
- error = -E
INVAL
;
+ error = -E
NOMEM
;
inode = proc_get_inode(dir->i_sb, de);
goto out_unlock;
}