git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysfs: fix race between readdir and lseek
[pandora-kernel.git]
/
fs
/
namei.c
diff --git
a/fs/namei.c
b/fs/namei.c
index
5008f01
..
9680cef
100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-1094,8
+1094,10
@@
static struct dentry *d_inode_lookup(struct dentry *parent, struct dentry *dentr
struct dentry *old;
/* Don't create child dentry for a dead directory. */
struct dentry *old;
/* Don't create child dentry for a dead directory. */
- if (unlikely(IS_DEADDIR(inode)))
+ if (unlikely(IS_DEADDIR(inode))) {
+ dput(dentry);
return ERR_PTR(-ENOENT);
return ERR_PTR(-ENOENT);
+ }
old = inode->i_op->lookup(inode, dentry, nd);
if (unlikely(old)) {
old = inode->i_op->lookup(inode, dentry, nd);
if (unlikely(old)) {
@@
-2137,7
+2139,7
@@
static struct file *do_last(struct nameidata *nd, struct path *path,
/* sayonara */
error = complete_walk(nd);
if (error)
/* sayonara */
error = complete_walk(nd);
if (error)
- return ERR_PTR(
-ECHILD
);
+ return ERR_PTR(
error
);
error = -ENOTDIR;
if (nd->flags & LOOKUP_DIRECTORY) {
error = -ENOTDIR;
if (nd->flags & LOOKUP_DIRECTORY) {
@@
-2236,7
+2238,7
@@
static struct file *do_last(struct nameidata *nd, struct path *path,
/* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
error = complete_walk(nd);
if (error)
/* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
error = complete_walk(nd);
if (error)
-
goto exit
;
+
return ERR_PTR(error)
;
error = -EISDIR;
if (S_ISDIR(nd->inode->i_mode))
goto exit;
error = -EISDIR;
if (S_ISDIR(nd->inode->i_mode))
goto exit;