Lines 1113-1119
zfsctl_snapdir_lookup(ap)
Link Here
|
1113 |
sep->se_name = kmem_alloc(strlen(nm) + 1, KM_SLEEP); |
1113 |
sep->se_name = kmem_alloc(strlen(nm) + 1, KM_SLEEP); |
1114 |
(void) strcpy(sep->se_name, nm); |
1114 |
(void) strcpy(sep->se_name, nm); |
1115 |
*vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap)); |
1115 |
*vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap)); |
1116 |
VN_HOLD(*vpp); |
|
|
1117 |
avl_insert(&sdp->sd_snaps, sep, where); |
1116 |
avl_insert(&sdp->sd_snaps, sep, where); |
1118 |
|
1117 |
|
1119 |
dmu_objset_rele(snap, FTAG); |
1118 |
dmu_objset_rele(snap, FTAG); |
Lines 1490-1496
zfsctl_snapshot_mknode(vnode_t *pvp, uint64_t objset)
Link Here
|
1490 |
|
1489 |
|
1491 |
vp = gfs_dir_create(sizeof (zfsctl_node_t), pvp, pvp->v_vfsp, |
1490 |
vp = gfs_dir_create(sizeof (zfsctl_node_t), pvp, pvp->v_vfsp, |
1492 |
&zfsctl_ops_snapshot, NULL, NULL, MAXNAMELEN, NULL, NULL); |
1491 |
&zfsctl_ops_snapshot, NULL, NULL, MAXNAMELEN, NULL, NULL); |
1493 |
VN_HOLD(vp); |
|
|
1494 |
zcp = vp->v_data; |
1492 |
zcp = vp->v_data; |
1495 |
zcp->zc_id = objset; |
1493 |
zcp->zc_id = objset; |
1496 |
VOP_UNLOCK(vp, 0); |
1494 |
VOP_UNLOCK(vp, 0); |