Re: powerpc/64: Fix atomic64_inc_not_zero() to return an int

2017-07-13 Thread Michael Ellerman
On Tue, 2017-07-11 at 12:10:54 UTC, Michael Ellerman wrote: > Although it's not documented anywhere, there is an expectation that > atomic64_inc_not_zero() returns a result which fits in an int. This is > the behaviour implemented on all arches except powerpc. > > This has caused at least one bug

[PATCH] powerpc/64: Fix atomic64_inc_not_zero() to return an int

2017-07-11 Thread Michael Ellerman
Although it's not documented anywhere, there is an expectation that atomic64_inc_not_zero() returns a result which fits in an int. This is the behaviour implemented on all arches except powerpc. This has caused at least one bug in practice, in the percpu-refcount code, where the long result from