aboutsummaryrefslogtreecommitdiff
path: root/fs/ext2/namei.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-01 09:56:10 +0200
committerIngo Molnar <mingo@elte.hu>2009-07-01 09:56:26 +0200
commit087021ba41e9481202103d51d3dd0c4706899a2b (patch)
treebf5d67420fd176682a1f8f1e9342ad397c23937a /fs/ext2/namei.c
parentfb9c818873a788c5c01c9868cc6050df96e2c7df (diff)
parente83c2b0ff325f52dda1aff3572d0e1516216c54b (diff)
Merge branch 'linus' into perfcounters/urgent
Merge reason: this branch was on a .30-ish base before, update it to an almost-.31-rc2 upstream base to pick up fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r--fs/ext2/namei.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index 6524ecaebb7..e1dedb0f787 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -66,8 +66,16 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str
inode = NULL;
if (ino) {
inode = ext2_iget(dir->i_sb, ino);
- if (IS_ERR(inode))
- return ERR_CAST(inode);
+ if (unlikely(IS_ERR(inode))) {
+ if (PTR_ERR(inode) == -ESTALE) {
+ ext2_error(dir->i_sb, __func__,
+ "deleted inode referenced: %lu",
+ ino);
+ return ERR_PTR(-EIO);
+ } else {
+ return ERR_CAST(inode);
+ }
+ }
}
return d_splice_alias(inode, dentry);
}