72 boolean_t conflict = B_FALSE; |
72 boolean_t conflict = B_FALSE; |
73 size_t bufsz = 0; |
73 size_t bufsz = 0; |
74 char *buf = NULL; |
74 char *buf = NULL; |
75 |
75 |
76 if (rpnp) { |
76 if (rpnp) { |
77 buf = rpnp->pn_path; |
77 buf = rpnp->pn_buf; |
78 bufsz = rpnp->pn_bufsize; |
78 bufsz = rpnp->pn_bufsize; |
79 } |
79 } |
80 if (exact) |
80 if (exact) |
81 mt = MT_EXACT; |
81 mt = MT_EXACT; |
82 /* |
82 /* |
83 * In the non-mixed case we only expect there would ever |
83 * In the non-mixed case we only expect there would ever |
84 * be one match, but we need to use the normalizing lookup. |
84 * be one match, but we need to use the normalizing lookup. |
85 */ |
85 */ |
86 error = zap_lookup_norm(zfsvfs->z_os, dzp->z_id, name, 8, 1, |
86 error = zap_lookup_norm(zfsvfs->z_os, dzp->z_id, name, 8, 1, |
87 zoid, mt, buf, bufsz, &conflict); |
87 zoid, mt, buf, bufsz, &conflict); |
88 if (deflags) |
88 if (!error && deflags) |
89 *deflags = conflict ? ED_CASE_CONFLICT : 0; |
89 *deflags = conflict ? ED_CASE_CONFLICT : 0; |
90 } else { |
90 } else { |
91 error = zap_lookup(zfsvfs->z_os, dzp->z_id, name, 8, 1, zoid); |
91 error = zap_lookup(zfsvfs->z_os, dzp->z_id, name, 8, 1, zoid); |
92 } |
92 } |
93 *zoid = ZFS_DIRENT_OBJ(*zoid); |
93 *zoid = ZFS_DIRENT_OBJ(*zoid); |