Revert Rev. 1.63 and add a comment why we have to zil_commit() here:

Operation zfs_znode.c::zfs_zget_cleaner() depends on this
zil_commit() as a barrier to guarantee the znode cannot
get freed before its log entries are resolved.
This commit is contained in:
hannken 2020-05-07 09:12:03 +00:00
parent caee431449
commit 5e7dc406e9

View File

@ -5858,11 +5858,16 @@ zfs_netbsd_reclaim(void *v)
zp->z_atime_dirty = 0;
dmu_tx_commit(tx);
}
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zfsvfs->z_log, zp->z_id);
}
/*
* Operation zfs_znode.c::zfs_zget_cleaner() depends on this
* zil_commit() as a barrier to guarantee the znode cannot
* get freed before its log entries are resolved.
*/
if (zfsvfs->z_log)
zil_commit(zfsvfs->z_log, zp->z_id);
if (zp->z_sa_hdl == NULL)
zfs_znode_free(zp);
else