--- linux-2.6.4-51.0.orig/fs/namei.c 2004-04-06 22:16:14.000000000 +0300 +++ linux-2.6.4-51.0/fs/namei.c 2004-04-09 16:07:42.856930416 +0300 @@ -749,10 +749,18 @@ last_component: nd->flags |= LOOKUP_LAST; err = revalidate_special(nd); nd->flags &= ~LOOKUP_LAST; - if (err) + if (err) break; goto return_reval; } + + if (err) { + if (!nd->dentry->d_inode) + err = -ENOENT; + + goto return_err; + } + if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { err = nd->dentry->d_op->d_hash(nd->dentry, &this); if (err < 0)