Skip to content

Commit 4f893cd

Browse files
mjguzikbehlendorf
authored andcommitted
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
1 parent 911a095 commit 4f893cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

module/os/freebsd/zfs/zfs_acl.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,11 @@ zfs_acl_chown_setattr(znode_t *zp)
11411141
int error;
11421142
zfs_acl_t *aclp;
11431143

1144-
if (zp->z_zfsvfs->z_replay == B_FALSE)
1144+
if (zp->z_zfsvfs->z_replay == B_FALSE) {
11451145
ASSERT_VOP_ELOCKED(ZTOV(zp), __func__);
1146+
ASSERT_VOP_IN_SEQC(ZTOV(zp));
1147+
}
11461148
ASSERT(MUTEX_HELD(&zp->z_acl_lock));
1147-
ASSERT_VOP_IN_SEQC(ZTOV(zp));
11481149

11491150
if ((error = zfs_acl_node_read(zp, B_TRUE, &aclp, B_FALSE)) == 0)
11501151
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)
11721173
int count = 0;
11731174
zfs_acl_phys_t acl_phys;
11741175

1175-
ASSERT_VOP_IN_SEQC(ZTOV(zp));
1176+
if (zp->z_zfsvfs->z_replay == B_FALSE) {
1177+
ASSERT_VOP_IN_SEQC(ZTOV(zp));
1178+
}
11761179

11771180
mode = zp->z_mode;
11781181

0 commit comments

Comments
 (0)