projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2656244
)
fs/sysv: dereferencing ERR_PTR()
author
Dan Carpenter
<error27@gmail.com>
Wed, 21 Apr 2010 10:30:32 +0000
(12:30 +0200)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 15 May 2010 11:16:33 +0000
(07:16 -0400)
I moved the dir_put_page() inside the if condition so we don't dereference
"page", if it's an ERR_PTR().
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/sysv/dir.c
patch
|
blob
|
history
diff --git
a/fs/sysv/dir.c
b/fs/sysv/dir.c
index
4e50286
..
1dabed2
100644
(file)
--- a/
fs/sysv/dir.c
+++ b/
fs/sysv/dir.c
@@
-164,8
+164,8
@@
struct sysv_dir_entry *sysv_find_entry(struct dentry *dentry, struct page **res_
name, de->name))
goto found;
}
+ dir_put_page(page);
}
- dir_put_page(page);
if (++n >= npages)
n = 0;