summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMateusz Guzik <[email protected]>2021-03-18 06:09:45 +0100
committerGitHub <[email protected]>2021-03-17 22:09:45 -0700
commit2f385c913f3e6d52c4a4cc670713acc80464ee7c (patch)
tree7fb9cc09b240fd274f123bb8089ae195d0a051a1 /module
parent46df6e98aaf324e7cbdf529f293a3c493645499e (diff)
FreeBSD: make seqc asserts conditional on replay
Avoids tripping on asserts when doing pool recovery. Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mateusz Guzik <[email protected]> Closes #11739
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/zfs/zfs_acl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/os/freebsd/zfs/zfs_acl.c b/module/os/freebsd/zfs/zfs_acl.c
index 23b87de8b..7089d0e0e 100644
--- a/module/os/freebsd/zfs/zfs_acl.c
+++ b/module/os/freebsd/zfs/zfs_acl.c
@@ -1141,10 +1141,11 @@ zfs_acl_chown_setattr(znode_t *zp)
int error;
zfs_acl_t *aclp;
- if (zp->z_zfsvfs->z_replay == B_FALSE)
+ if (zp->z_zfsvfs->z_replay == B_FALSE) {
ASSERT_VOP_ELOCKED(ZTOV(zp), __func__);
+ ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ }
ASSERT(MUTEX_HELD(&zp->z_acl_lock));
- ASSERT_VOP_IN_SEQC(ZTOV(zp));
if ((error = zfs_acl_node_read(zp, B_TRUE, &aclp, B_FALSE)) == 0)
zp->z_mode = zfs_mode_compute(zp->z_mode, aclp,
@@ -1172,7 +1173,9 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx)
int count = 0;
zfs_acl_phys_t acl_phys;
- ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ if (zp->z_zfsvfs->z_replay == B_FALSE) {
+ ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ }
mode = zp->z_mode;