Deleted Added
full compact
zfs_ctldir.c (209962) zfs_ctldir.c (211900)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 951 unchanged lines hidden (view full) ---

960 (void) strcpy(sep->se_name, nm);
961 *vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap));
962 VN_HOLD(*vpp);
963 avl_insert(&sdp->sd_snaps, sep, where);
964
965 dmu_objset_close(snap);
966domount:
967 mountpoint_len = strlen(dvp->v_vfsp->mnt_stat.f_mntonname) +
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 951 unchanged lines hidden (view full) ---

960 (void) strcpy(sep->se_name, nm);
961 *vpp = sep->se_root = zfsctl_snapshot_mknode(dvp, dmu_objset_id(snap));
962 VN_HOLD(*vpp);
963 avl_insert(&sdp->sd_snaps, sep, where);
964
965 dmu_objset_close(snap);
966domount:
967 mountpoint_len = strlen(dvp->v_vfsp->mnt_stat.f_mntonname) +
968 strlen("/.zfs/snapshot/") + strlen(nm) + 1;
968 strlen("/" ZFS_CTLDIR_NAME "/snapshot/") + strlen(nm) + 1;
969 mountpoint = kmem_alloc(mountpoint_len, KM_SLEEP);
969 mountpoint = kmem_alloc(mountpoint_len, KM_SLEEP);
970 (void) snprintf(mountpoint, mountpoint_len, "%s/.zfs/snapshot/%s",
970 (void) snprintf(mountpoint, mountpoint_len,
971 "%s/" ZFS_CTLDIR_NAME "/snapshot/%s",
971 dvp->v_vfsp->mnt_stat.f_mntonname, nm);
972 err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0);
973 kmem_free(mountpoint, mountpoint_len);
974 if (err == 0) {
975 /*
976 * Fix up the root vnode mounted on .zfs/snapshot/<snapname>.
977 *
978 * This is where we lie about our v_vfsp in order to

--- 613 unchanged lines hidden ---
972 dvp->v_vfsp->mnt_stat.f_mntonname, nm);
973 err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0);
974 kmem_free(mountpoint, mountpoint_len);
975 if (err == 0) {
976 /*
977 * Fix up the root vnode mounted on .zfs/snapshot/<snapname>.
978 *
979 * This is where we lie about our v_vfsp in order to

--- 613 unchanged lines hidden ---