aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zpl_ctldir.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zpl_ctldir.c')
-rw-r--r--module/zfs/zpl_ctldir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c
index 96157ec78..8afe8bfdb 100644
--- a/module/zfs/zpl_ctldir.c
+++ b/module/zfs/zpl_ctldir.c
@@ -497,10 +497,11 @@ zpl_shares_getattr(struct vfsmount *mnt, struct dentry *dentry,
}
error = -zfs_zget(zsb, zsb->z_shares_dir, &dzp);
- if (error == 0)
- error = -zfs_getattr_fast(dentry->d_inode, stat);
+ if (error == 0) {
+ error = -zfs_getattr_fast(ZTOI(dzp), stat);
+ iput(ZTOI(dzp));
+ }
- iput(ZTOI(dzp));
ZFS_EXIT(zsb);
ASSERT3S(error, <=, 0);