lkml.org 
[lkml]   [2005]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: AGP bogosities
From
Date
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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.118 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site