mm/page-writeback.c: use div64_ul() for u64-by-unsigned-long divide
The two variables 'numerator' and 'denominator', though they are
declared as long, they should actually be unsigned long (according to
the implementation of the fprop_fraction_percpu() function)
And do_div() does a 64-by-32 division, while the divisor 'denominator'
is unsigned long, thus 64-bit on 64-bit platforms. Hence the proper
function to call is div64_ul().
Signed-off-by: Wen Yang <email@example.com>
Reviewed-by: Andrew Morton <firstname.lastname@example.org>
Cc: Qian Cai <email@example.com>
Cc: Tejun Heo <firstname.lastname@example.org>
Cc: Jens Axboe <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
1 file changed