Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of #13219 and #13220 to the staging branch #13233

Merged
merged 2 commits into from
Mar 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion module/os/freebsd/spl/spl_sysevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,17 @@ sysevent_worker(void *arg __unused)
nvlist_free(event);
}
}
zfs_zevent_destroy(ze);

/*
* We avoid zfs_zevent_destroy() here because we're otherwise racing
* against fm_fini() destroying the zevent_lock. zfs_zevent_destroy()
* will currently only clear `ze->ze_zevent` from an event list then
* free `ze`, so just inline the free() here -- events have already
* been drained.
*/
VERIFY3P(ze->ze_zevent, ==, NULL);
kmem_free(ze, sizeof (zfs_zevent_t));

kthread_exit();
}

Expand Down
4 changes: 3 additions & 1 deletion module/os/freebsd/zfs/zfs_znode.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,9 @@ zfs_xvattr_set(znode_t *zp, xvattr_t *xvap, dmu_tx_t *tx)
xoap = xva_getxoptattr(xvap);
ASSERT3P(xoap, !=, NULL);

ASSERT_VOP_IN_SEQC(ZTOV(zp));
if (zp->z_zfsvfs->z_replay == B_FALSE) {
ASSERT_VOP_IN_SEQC(ZTOV(zp));
}

if (XVA_ISSET_REQ(xvap, XAT_CREATETIME)) {
uint64_t times[2];
Expand Down