7779 clean up unused definitions in zfs ctldir code
illumos/illumos-gate@b7f9f60c8e
b7f9f60c8e
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@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>
This commit is contained in:
parent
43fd8e6d5e
commit
16244ff154
@ -64,7 +64,6 @@ int zfsctl_lookup_objset(vfs_t *vfsp, uint64_t objsetid, zfsvfs_t **zfsvfsp);
|
||||
|
||||
#define ZFSCTL_INO_ROOT 0x1
|
||||
#define ZFSCTL_INO_SNAPDIR 0x2
|
||||
#define ZFSCTL_INO_SHARES 0x3
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -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 index)
|
||||
{
|
||||
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
|
||||
|
||||
ASSERT(index <= 2);
|
||||
ASSERT(index < 2);
|
||||
|
||||
if (index == 0)
|
||||
return (ZFSCTL_INO_SNAPDIR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user