Remove SYNC_ATTR check
[zfs.git] / module / zfs / zfs_ctldir.c
index 362de4d..c2b8b75 100644 (file)
@@ -31,7 +31,7 @@
  * does not actually exist on disk.
  *
  * For 'snapshot', we don't want to have all snapshots always mounted, because
- * this would take up a huge amount of space in /etc/mnttab.  We have three
+ * this would take up a huge amount of space in /etc/mtab.  We have three
  * types of objects:
  *
  *     ctldir ------> snapshotdir -------> snapshot
@@ -63,6 +63,8 @@
  * so that it cannot be freed until all snapshots have been unmounted.
  */
 
+#ifdef HAVE_ZPL
+
 #include <fs/fs_subr.h>
 #include <sys/zfs_ctldir.h>
 #include <sys/zfs_ioctl.h>
@@ -126,15 +128,6 @@ static vnode_t *zfsctl_mknode_shares(vnode_t *);
 static vnode_t *zfsctl_snapshot_mknode(vnode_t *, uint64_t objset);
 static int zfsctl_unmount_snap(zfs_snapentry_t *, int, cred_t *);
 
-static gfs_opsvec_t zfsctl_opsvec[] = {
-       { ".zfs", zfsctl_tops_root, &zfsctl_ops_root },
-       { ".zfs/snapshot", zfsctl_tops_snapdir, &zfsctl_ops_snapdir },
-       { ".zfs/snapshot/vnode", zfsctl_tops_snapshot, &zfsctl_ops_snapshot },
-       { ".zfs/shares", zfsctl_tops_shares, &zfsctl_ops_shares_dir },
-       { ".zfs/shares/vnode", zfsctl_tops_shares, &zfsctl_ops_shares },
-       { NULL }
-};
-
 /*
  * Root directory elements.  We only have two entries
  * snapshot and shares.
@@ -158,7 +151,6 @@ static gfs_dirent_t zfsctl_root_entries[] = {
 void
 zfsctl_init(void)
 {
-       VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0);
 }
 
 void
@@ -590,7 +582,7 @@ zfsctl_rename_snap(zfsctl_snapdir_t *sdp, zfs_snapentry_t *sep, const char *nm)
        ASSERT3U(strlen(newpath) + strlen(nm), <, sizeof (newpath));
        (void) strcat(newpath, nm);
        refstr_rele(pathref);
-       vfs_setmntpoint(vfsp, newpath);
+       vfs_setmntpoint(vfsp, newpath, 0);
 
        pathref = vfs_getresource(vfsp);
        (void) strncpy(newpath, refstr_value(pathref), sizeof (newpath));
@@ -599,7 +591,7 @@ zfsctl_rename_snap(zfsctl_snapdir_t *sdp, zfs_snapentry_t *sep, const char *nm)
        ASSERT3U(strlen(newpath) + strlen(nm), <, sizeof (newpath));
        (void) strcat(newpath, nm);
        refstr_rele(pathref);
-       vfs_setresource(vfsp, newpath);
+       vfs_setresource(vfsp, newpath, 0);
 
        vfs_unlock(vfsp);
 }
@@ -749,7 +741,8 @@ zfsctl_snapdir_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t  **vpp,
                return (err);
 
        if (err == 0) {
-               err = dmu_objset_snapshot(name, dirname, NULL, B_FALSE);
+               err = dmu_objset_snapshot(name, dirname, NULL, NULL,
+                   B_FALSE, B_FALSE, -1);
                if (err)
                        return (err);
                err = lookupnameat(dirname, seg, follow, NULL, vpp, dvp);
@@ -1346,3 +1339,4 @@ zfsctl_umount_snapshots(vfs_t *vfsp, int fflags, cred_t *cr)
 
        return (error);
 }
+#endif /* HAVE_ZPL */