Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262050AbVCLW33 (ORCPT ); Sat, 12 Mar 2005 17:29:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261206AbVCLW33 (ORCPT ); Sat, 12 Mar 2005 17:29:29 -0500 Received: from mail.parknet.co.jp ([210.171.160.6]:9991 "EHLO mail.parknet.co.jp") by vger.kernel.org with ESMTP id S261207AbVCLW1I (ORCPT ); Sat, 12 Mar 2005 17:27:08 -0500 To: Linus Torvalds Cc: Paul Mackerras , Dave Jones , benh@kernel.crashing.org, linux-kernel@vger.kernel.org Subject: Re: AGP bogosities References: <16944.62310.967444.786526@cargo.ozlabs.ibm.com> <20050311021248.GA20697@redhat.com> <16944.65532.632559.277927@cargo.ozlabs.ibm.com> <87vf7xg72s.fsf@devron.myhome.or.jp> From: OGAWA Hirofumi Date: Sun, 13 Mar 2005 07:26:32 +0900 In-Reply-To: (Linus Torvalds's message of "Sat, 12 Mar 2005 09:09:00 -0800 (PST)") Message-ID: <877jkcmrfr.fsf@devron.myhome.or.jp> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 971 Lines: 25 Linus Torvalds 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 - 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/