I was re-writing the patch, but after reading over the function, is
the return value correct? I did a quick run through on paper about
what would happen if the (real) bottom = 5 and the (real) top = 15,
and the (initial) top = 20. So this is a size of 10 pages, which is
what the function should return... but:
top = 20, bottom = 5
test = 12
bottom = 12
(top - bottom) = 8
top = 20, bottom = 12
test = 16
top = 16
(top - bottom) = 4
top = 16, bottom = 12
test = 14
bottom = 14
(top - bottom) = 2
top = 16, bottom = 14
test = 15
bottom = 15
(top - bottom) = 1
<loop exits>
return 16 << UM_KERN_PAGE_SHIFT;
Hmm. Are my calculations wrong?
--
Tom Spink
--