From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Subject: Re: GFS, what's remaining Date: Mon, 5 Sep 2005 14:29:16 +0800 Message-ID: <20050905062916.GA17607@redhat.com> References: <20050901104620.GA22482@redhat.com> <1125574523.5025.10.camel@laptopd505.fenrus.org> Reply-To: linux clustering Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, akpm@osdl.org, linux-cluster@redhat.com, linux-kernel@vger.kernel.org Return-path: To: Arjan van de Ven Content-Disposition: inline In-Reply-To: <1125574523.5025.10.camel@laptopd505.fenrus.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cluster-bounces@redhat.com Errors-To: linux-cluster-bounces@redhat.com List-Id: linux-fsdevel.vger.kernel.org On Thu, Sep 01, 2005 at 01:35:23PM +0200, Arjan van de Ven wrote: > +static unsigned int handle_roll(atomic_t *a) > +{ > + int x = atomic_read(a); > + if (x < 0) { > + atomic_set(a, 0); > + return 0; > + } > + return (unsigned int)x; > +} > > this is just plain scary. Not really, it was just resetting atomic statistics counters when they became negative. Unecessary, though, so removed. Dave