On 1/11/21 5:58 AM, Nikolay Borisov wrote:
It's currently u64 which gets instantly translated either to LONG_MAX
(if U64_MAX is passed) or casted to an unsigned long (which is in fact,
wrong because iwriteback_control::nr_to_write is a signed, long type).

Just convert the function's argument to be long time which obviates the
need to manually convert u64 value to a long. Adjust all call sites
which pass U64_MAX to pass LONG_MAX. Finally ensure that in
shrink_delalloc the u64 is converted to a long without overflowing,
resulting in a negative number.

Signed-off-by: Nikolay Borisov <[email protected]>

You can add

Reviewed-by: Josef Bacik <[email protected]>

to both patches, thanks,

Josef

Reply via email to