svn commit: r316903 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys
Andriy Gapon
avg at FreeBSD.org
Fri Apr 14 18:14:43 UTC 2017
Author: avg
Date: Fri Apr 14 18:14:41 2017
New Revision: 316903
URL: https://svnweb.freebsd.org/changeset/base/316903
Log:
7779 clean up unused definitions in zfs ctldir code
illumos/illumos-gate at b7f9f60c8eb061c94244a6181a00288684164e1b
https://github.com/illumos/illumos-gate/commit/b7f9f60c8eb061c94244a6181a00288684164e1b
https://www.illumos.org/issues/7779
zfsctl_ops_shares_dir and ZFSCTL_INO_SHARES are essentially dead code.
While there, fix the index range check in zfsctl_root_inode_cb.
Reviewed by: Matt Ahrens <mahrens at delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim at delphix.com>
Approved by: Dan McDonald <danmcd at omniti.com>
Author: Andriy Gapon <andriy.gapon at clusterhq.com>
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ctldir.h
vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ctldir.h
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ctldir.h Fri Apr 14 18:14:02 2017 (r316902)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ctldir.h Fri Apr 14 18:14:41 2017 (r316903)
@@ -64,7 +64,6 @@ int zfsctl_lookup_objset(vfs_t *vfsp, ui
#define ZFSCTL_INO_ROOT 0x1
#define ZFSCTL_INO_SNAPDIR 0x2
-#define ZFSCTL_INO_SHARES 0x3
#ifdef __cplusplus
}
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c Fri Apr 14 18:14:02 2017 (r316902)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c Fri Apr 14 18:14:41 2017 (r316903)
@@ -117,7 +117,6 @@ vnodeops_t *zfsctl_ops_root;
vnodeops_t *zfsctl_ops_snapdir;
vnodeops_t *zfsctl_ops_snapshot;
vnodeops_t *zfsctl_ops_shares;
-vnodeops_t *zfsctl_ops_shares_dir;
static const fs_operation_def_t zfsctl_tops_root[];
static const fs_operation_def_t zfsctl_tops_snapdir[];
@@ -133,8 +132,7 @@ 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 },
+ { ".zfs/shares", zfsctl_tops_shares, &zfsctl_ops_shares },
{ NULL }
};
@@ -178,14 +176,11 @@ zfsctl_fini(void)
vn_freevnodeops(zfsctl_ops_snapshot);
if (zfsctl_ops_shares)
vn_freevnodeops(zfsctl_ops_shares);
- if (zfsctl_ops_shares_dir)
- vn_freevnodeops(zfsctl_ops_shares_dir);
zfsctl_ops_root = NULL;
zfsctl_ops_snapdir = NULL;
zfsctl_ops_snapshot = NULL;
zfsctl_ops_shares = NULL;
- zfsctl_ops_shares_dir = NULL;
}
boolean_t
@@ -194,8 +189,7 @@ zfsctl_is_node(vnode_t *vp)
return (vn_matchops(vp, zfsctl_ops_root) ||
vn_matchops(vp, zfsctl_ops_snapdir) ||
vn_matchops(vp, zfsctl_ops_snapshot) ||
- vn_matchops(vp, zfsctl_ops_shares) ||
- vn_matchops(vp, zfsctl_ops_shares_dir));
+ vn_matchops(vp, zfsctl_ops_shares));
}
@@ -209,7 +203,7 @@ zfsctl_root_inode_cb(vnode_t *vp, int in
{
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
- ASSERT(index <= 2);
+ ASSERT(index < 2);
if (index == 0)
return (ZFSCTL_INO_SNAPDIR);
More information about the svn-src-all
mailing list