On Thu, Oct 10, 2024 at 06:13:07PM -0700, Darrick J. Wong wrote: > + pre->q_prealloc_hi_wmark = res->hardlimit; > + pre->q_prealloc_lo_wmark = res->softlimit; > + if (!pre->q_prealloc_lo_wmark) { > + pre->q_prealloc_lo_wmark = pre->q_prealloc_hi_wmark; > + do_div(pre->q_prealloc_lo_wmark, 100); > + pre->q_prealloc_lo_wmark *= 95; > + } > + > + space = pre->q_prealloc_hi_wmark; > + > + do_div(space, 100); Maybe use div_u64 instead of the fugly do_div helper? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>