Really flush when we check for holes.

`zn_flush_cached_data(zp, B_FALSE)` doesn't wait for the flush
to return. This almost certainly comes up vanishingly often, but.

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
This commit is contained in:
Rich Ercolani 2024-03-16 12:17:22 -04:00
parent 8f2f6cd2ac
commit f116c4638d
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ zfs_holey_common(znode_t *zp, ulong_t cmd, loff_t *off)
/* Flush any mmap()'d data to disk */
if (zn_has_cached_data(zp, 0, file_sz - 1))
zn_flush_cached_data(zp, B_FALSE);
zn_flush_cached_data(zp, B_TRUE);
lr = zfs_rangelock_enter(&zp->z_rangelock, 0, UINT64_MAX, RL_READER);
error = dmu_offset_next(ZTOZSB(zp)->z_os, zp->z_id, hole, &noff);