aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zfs_log.c')
-rw-r--r--module/zfs/zfs_log.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c
index 21296c76e..cfb2f3be2 100644
--- a/module/zfs/zfs_log.c
+++ b/module/zfs/zfs_log.c
@@ -232,7 +232,13 @@ zfs_xattr_owner_unlinked(znode_t *zp)
int unlinked = 0;
znode_t *dzp;
+ /*
+ * zrele drops the vnode lock which violates the VOP locking contract
+ * on FreeBSD. See comment at the top of zfs_replay.c for more detail.
+ */
+#ifndef __FreeBSD__
zhold(zp);
+#endif
/*
* if zp is XATTR node, keep walking up via z_xattr_parent until we
* get the owner
@@ -247,7 +253,9 @@ zfs_xattr_owner_unlinked(znode_t *zp)
zp = dzp;
unlinked = zp->z_unlinked;
}
+#ifndef __FreeBSD__
zrele(zp);
+#endif
return (unlinked);
}