error = __vfs_follow_link(nd, s);
else if (nd->last_type == LAST_BIND) {
nd->flags |= LOOKUP_JUMPED;
- if (nd->path.dentry->d_inode->i_op->follow_link) {
+ nd->inode = nd->path.dentry->d_inode;
+ if (nd->inode->i_op->follow_link) {
/* stepped on a _really_ weird one */
path_put(&nd->path);
error = -ELOOP;
err = do_follow_link(&next, nd);
if (err)
return err;
- nd->inode = nd->path.dentry->d_inode;
}
err = -ENOTDIR;
if (!nd->inode->i_op->lookup)
err = do_follow_link(&next, nd);
if (err)
return err;
- nd->inode = nd->path.dentry->d_inode;
}
if (lookup_flags & LOOKUP_DIRECTORY) {
err = -ENOTDIR;