Lines Matching refs:zp

51 pathent_free(zfs_pathent_t *zp)
59 if (zp->zp_needsfree) {
60 free((void *)zp->zp_name);
61 zp->zp_name = NULL;
63 if (zp->zp_zhp != NULL) {
64 ASSERT(zp->zp_zhp_ent == NULL);
65 zp->zp_zhp->zfs_cached = B_FALSE;
66 zfs_close(zp->zp_zhp);
68 free(zp);
208 zfs_pathent_t *zp = found;
209 if ((zhp = zp->zp_zhp) == NULL) {
210 zp = zp->zp_zhp_ent;
211 if (zp != NULL)
212 zhp = zp->zp_zhp;
225 zfs_cache_add_mountpoint_entry(zfs_handle_cache_t *zhc, zfs_pathent_t *zp)
227 zfs_handle_t *zhp = zp->zp_zhp;
239 mzp->zp_zhp_ent = zp;
249 zfs_pathent_t *zp = NULL;
257 zp = found;
258 if ((zhp = zp->zp_zhp) == NULL &&
259 zp->zp_zhp_ent != NULL) {
260 zp = zp->zp_zhp_ent;
261 zhp = zp->zp_zhp;
269 zhp = zfs_cache_path_to_zhandle(zhc, path, type, &zp, quiet);
273 if (zp != NULL) {
276 ASSERT(zp->zp_zhp == zhp);
277 ASSERT(zp->zp_zhp_ent == NULL);
281 fzp->zp_zhp_ent = zp;
287 zp = zfs_alloc(zhc->zhc_hdl, sizeof (zfs_pathent_t));
290 zp->zp_name = zhp->zfs_name;
291 zp->zp_zhp = zhp;
292 avl_insert(&zhc->zhc_path_avl, zp, path_index);
294 zfs_cache_add_mountpoint_entry(zhc, zp);
296 zfs_pathent_t *fzp = zp; /* file path */
301 zp = zfs_alloc(zhc->zhc_hdl, sizeof (zfs_pathent_t));
302 zp->zp_name = zhp->zfs_name;
303 zp->zp_zhp = zhp;
304 avl_add(&zhc->zhc_path_avl, zp);
305 fzp->zp_zhp_ent = zp;
347 zfs_pathent_t *zp;
362 zp = zfs_alloc(zhc->zhc_hdl, sizeof (zfs_pathent_t));
363 zp->zp_name = zhp->zfs_name;
364 zp->zp_zhp = zhp;
365 avl_insert(&zhc->zhc_path_avl, zp, index);
367 zfs_cache_add_mountpoint_entry(zhc, zp);
386 zfs_pathent_t *zp = found;
387 if (zhp == zp->zp_zhp) {
391 zp->zp_zhp->zfs_cached = B_FALSE;
392 zp->zp_name = zfs_strdup(zhp->zfs_hdl,
394 zp->zp_needsfree = B_TRUE;
395 zp->zp_zhp = NULL;