aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zfs_ctldir.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/os/linux/zfs/zfs_ctldir.c')
-rw-r--r--module/os/linux/zfs/zfs_ctldir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/os/linux/zfs/zfs_ctldir.c b/module/os/linux/zfs/zfs_ctldir.c
index 909748f51..c2748ce45 100644
--- a/module/os/linux/zfs/zfs_ctldir.c
+++ b/module/os/linux/zfs/zfs_ctldir.c
@@ -1185,7 +1185,7 @@ zfsctl_shares_lookup(struct inode *dip, char *name, struct inode **ipp,
int flags, cred_t *cr, int *direntflags, pathname_t *realpnp)
{
zfsvfs_t *zfsvfs = ITOZSB(dip);
- struct inode *ip;
+ znode_t *zp;
znode_t *dzp;
int error;
@@ -1197,8 +1197,8 @@ zfsctl_shares_lookup(struct inode *dip, char *name, struct inode **ipp,
}
if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) {
- error = zfs_lookup(ZTOI(dzp), name, &ip, 0, cr, NULL, NULL);
- iput(ZTOI(dzp));
+ error = zfs_lookup(dzp, name, &zp, 0, cr, NULL, NULL);
+ zrele(dzp);
}
ZFS_EXIT(zfsvfs);