From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 05/17] fs: icache lock i_count Date: Thu, 30 Sep 2010 23:23:39 -0700 Message-ID: <20100930232339.32ed3b38.akpm@linux-foundation.org> References: <1285762729-17928-1-git-send-email-david@fromorbit.com> <1285762729-17928-6-git-send-email-david@fromorbit.com> <20100929215229.160c7bce.akpm@linux-foundation.org> <20101001055536.GD32349@infradead.org> <20100930230416.868e6468.akpm@linux-foundation.org> <20101001061602.GA19107@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:35858 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349Ab0JAGXI (ORCPT ); Fri, 1 Oct 2010 02:23:08 -0400 In-Reply-To: <20101001061602.GA19107@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 1 Oct 2010 02:16:02 -0400 Christoph Hellwig wrote: > On Thu, Sep 30, 2010 at 11:04:16PM -0700, Andrew Morton wrote: > > No, we've run into problems *frequently*. A common case is where we > > convert a mutex to a spinlock or vice versa. If you don't rename the > > lock, the code still compiles (with warnings) and crashes horridly at > > runtime. > > Sorry, if you run code with that obvious warnings you beg for trouble. > If you really believe your advanced users arw too stupid to read > compiler warnings enforcing -Werror is for sure better than obsfucating > the code. Well, it has happened, fairly regularly. A common scenario is where someone has done a conversion in one tree and someone else has touched overlapping code in another tree and when the two meet in linux-next, splat. Renaming the field simply eliminates this. Of course, the warnings don't get noticed because of the enormous warning storm which a kernel build produces (generally much worse on non-x86, btw). Another reason for remaining a field is when we desire that it henceforth be accessed via accessor functions - renaming it will reliably break any unconverted code.