diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext3/namei.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index bd87a6077536..6ddaa0a42b24 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1047,8 +1047,16 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str | |||
1047 | return ERR_PTR(-EIO); | 1047 | return ERR_PTR(-EIO); |
1048 | } | 1048 | } |
1049 | inode = ext3_iget(dir->i_sb, ino); | 1049 | inode = ext3_iget(dir->i_sb, ino); |
1050 | if (IS_ERR(inode)) | 1050 | if (unlikely(IS_ERR(inode))) { |
1051 | return ERR_CAST(inode); | 1051 | if (PTR_ERR(inode) == -ESTALE) { |
1052 | ext3_error(dir->i_sb, __func__, | ||
1053 | "deleted inode referenced: %lu", | ||
1054 | ino); | ||
1055 | return ERR_PTR(-EIO); | ||
1056 | } else { | ||
1057 | return ERR_CAST(inode); | ||
1058 | } | ||
1059 | } | ||
1052 | } | 1060 | } |
1053 | return d_splice_alias(inode, dentry); | 1061 | return d_splice_alias(inode, dentry); |
1054 | } | 1062 | } |