]> git.proxmox.com Git - mirror_zfs.git/commit
ZIL: Fix race introduced by f63811f0721.
authorAlexander Motin <mav@FreeBSD.org>
Fri, 9 Jun 2023 17:08:05 +0000 (13:08 -0400)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 17:08:05 +0000 (10:08 -0700)
commit55b1842f92a24fe7192d129bca7b60882080d31a
tree99656b3b94ce619b0f11ad2c4487c22bb2390e57
parent6c962690245a6a2a4dfc2350c71a249641139c26
ZIL: Fix race introduced by f63811f0721.

We are not allowed to access lwb after setting LWB_STATE_FLUSH_DONE
state and dropping zl_lock, since it may be freed by zil_sync().
To free itxs and waiters after dropping the lock we need to move
lwb_itxs and lwb_waiters lists elements to local storage.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14957
Closes #14959
module/zfs/zil.c