err = _sysio_namei(_sysio_cwd, oldpath, 0, &intent, &old);
if (err)
goto out;
- if (S_ISDIR(old->p_base->pb_ino->i_mode)) {
+ if (S_ISDIR(old->p_base->pb_ino->i_stbuf.st_mode)) {
err = -EPERM;
goto error1;
}
err = -EXDEV;
goto error2;
}
- err = old->p_base->pb_ino->i_ops.inop_link(old, new);
+ /*
+ * Use the parent node operations to request the task in case the
+ * driver is implemented using differentiated inode operations based
+ * on file type, such as incore does.
+ */
+ err = old->p_parent->p_base->pb_ino->i_ops.inop_link(old, new);
if (err)
goto error2;
/*