FreeBSD: make seqc asserts conditional on replay
Avoids tripping on asserts when doing pool recovery. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes #11739
This commit is contained in:
parent
46df6e98aa
commit
2f385c913f
|
@ -1141,10 +1141,11 @@ zfs_acl_chown_setattr(znode_t *zp)
|
||||||
int error;
|
int error;
|
||||||
zfs_acl_t *aclp;
|
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_ELOCKED(ZTOV(zp), __func__);
|
||||||
ASSERT(MUTEX_HELD(&zp->z_acl_lock));
|
|
||||||
ASSERT_VOP_IN_SEQC(ZTOV(zp));
|
ASSERT_VOP_IN_SEQC(ZTOV(zp));
|
||||||
|
}
|
||||||
|
ASSERT(MUTEX_HELD(&zp->z_acl_lock));
|
||||||
|
|
||||||
if ((error = zfs_acl_node_read(zp, B_TRUE, &aclp, B_FALSE)) == 0)
|
if ((error = zfs_acl_node_read(zp, B_TRUE, &aclp, B_FALSE)) == 0)
|
||||||
zp->z_mode = zfs_mode_compute(zp->z_mode, aclp,
|
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;
|
int count = 0;
|
||||||
zfs_acl_phys_t acl_phys;
|
zfs_acl_phys_t acl_phys;
|
||||||
|
|
||||||
|
if (zp->z_zfsvfs->z_replay == B_FALSE) {
|
||||||
ASSERT_VOP_IN_SEQC(ZTOV(zp));
|
ASSERT_VOP_IN_SEQC(ZTOV(zp));
|
||||||
|
}
|
||||||
|
|
||||||
mode = zp->z_mode;
|
mode = zp->z_mode;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue