Re: AGP bogosities

OGAWA Hirofumi
2005-03-12T22:29:29Z

Linus Torvalds <torvalds@osdl.org> writes:

> Btw, this should probably check for negative 32-bit values too, ie the
> test should probably be
>
> if ((int)atomic_read(v) <= 0)
>
> and it should probably be done for the regular atomic_dec() etc cases too,
> not just the dec-and-test. "atomic" values simply aren't historically
> well-defined for negative values (sparc used to limit them to 24 bits), so
> a negative thing would always be a bug, I think.

However, inode->i_writecount and some stuffs seems to be already using
the negative values (or sparc was used the signed 24 bits value).

Anyway, unfortunately inode->i_writecount triggered in atomic_dec().

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>