[dm-devel] [PATCH 2/2] lib/lcm.c: lcm(n, 0)=lcm(0, n) is 0, not n

Rasmus Villemoes linux at rasmusvillemoes.dk
Mon Mar 30 19:38:27 UTC 2015


On Sun, Mar 29 2015, Mike Snitzer <snitzer at redhat.com> wrote:

> On Tue, Dec 9, 2014 at 4:03 PM, Rasmus Villemoes
> <linux at rasmusvillemoes.dk> wrote:
>> Return the mathematically correct answer when an argument is 0.
>>
>> Signed-off-by: Rasmus Villemoes <linux at rasmusvillemoes.dk>
>
> This change is the source of 3.19 regression for stacking device
> limits, via commit 69c953c ("lib/lcm.c: lcm(n,0)=lcm(0,n) is 0, not
> n").
>
>
> Rasmus, mathematical purity of lcm() aside, it'd have been nice if you
> looked at the lcm() callers to determine whether you'd be breaking
> them.

I'm sorry about this. I thought I did check the callers, but evidently
not well enough.

Rasmus




More information about the dm-devel mailing list