zfsctl: tighten an assertion and remove an unused definition

There are only two entries under .zfs and 'shares' has an ID of a
special persistent object in its filesystem.

MFC after:	1 week
This commit is contained in:
Andriy Gapon 2016-05-18 08:23:39 +00:00
parent 439e9b6804
commit e6d4eefe2a
2 changed files with 1 additions and 2 deletions

View file

@ -61,7 +61,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
}

View file

@ -223,7 +223,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);