diff options
author | Andriy Gapon <[email protected]> | 2023-03-07 23:48:43 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-07 13:48:43 -0800 |
commit | a55254be7a5cb67c45e2b8ab654d90147d06e1e1 (patch) | |
tree | a5409152319d81fdd0e3020bd5844df3cb449190 /module | |
parent | 119138701222d9e999900e11f30b1d0816fc5dd9 (diff) |
[FreeBSD] fix false assert in cache_vop_rmdir when replaying ZIL
The assert is enabled when DEBUG_VFS_LOCKS kernel option is set.
The exact panic is:
panic: condition seqc_in_modify(_vp->v_seqc) not met
It happens because seqc protocol is not followed for ZIL replay.
But we actually do not need to make any namecache calls at that stage,
because the namecache use is not enabled until after the replay is
completed.
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Andriy Gapon <[email protected]>
Closes #14566
Diffstat (limited to 'module')
-rw-r--r-- | module/os/freebsd/zfs/zfs_vnops_os.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c index f552531a5..148def20c 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -1624,7 +1624,8 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr) dmu_tx_commit(tx); - cache_vop_rmdir(dvp, vp); + if (zfsvfs->z_use_namecache) + cache_vop_rmdir(dvp, vp); out: if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); |