This commit is contained in:
loli10K 2024-07-30 09:10:00 -07:00 committed by GitHub
commit 92edad1116
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ dsl_sync_task_sync(dsl_sync_task_t *dst, dmu_tx_t *tx)
uint64_t used = dsl_dir_phys(dp->dp_root_dir)->dd_used_bytes;
/* MOS space is triple-dittoed, so we multiply by 3. */
if (used + dst->dst_space * 3 > quota) {
if (dst->dst_space > 0 && used + dst->dst_space * 3 > quota) {
dst->dst_error = SET_ERROR(ENOSPC);
if (dst->dst_nowaiter)
kmem_free(dst, sizeof (*dst));

View File

@ -532,7 +532,7 @@ zcp_synctask_wrapper(lua_State *state)
uint64_t used = dsl_dir_phys(dp->dp_root_dir)->dd_used_bytes +
ri->zri_space_used;
if (used + funcspace > quota) {
if (funcspace > 0 && used + funcspace > quota) {
err = SET_ERROR(ENOSPC);
}
}