Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755787AbYHARlN (ORCPT ); Fri, 1 Aug 2008 13:41:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752201AbYHARk6 (ORCPT ); Fri, 1 Aug 2008 13:40:58 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35766 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbYHARk5 (ORCPT ); Fri, 1 Aug 2008 13:40:57 -0400 Date: Fri, 1 Aug 2008 10:40:46 -0700 From: Andrew Morton To: Linus Torvalds Cc: Rusty Russell , Paul Menage , linux-kernel@vger.kernel.org, Matthew Wilcox , "Randy.Dunlap" , Christoph Hellwig Subject: Re: [PATCH] Introduce down_try() so we can move away from down_trylock() Message-Id: <20080801104046.e9e8d6fd.akpm@linux-foundation.org> In-Reply-To: References: <200807291015.02865.rusty@rustcorp.com.au> <6599ad830807281727r63a57a1g11972c5395828aae@mail.gmail.com> <200807292301.18733.rusty@rustcorp.com.au> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 26 On Fri, 1 Aug 2008 10:26:33 -0700 (PDT) Linus Torvalds wrote: > > I planned on removing the much-disliked down_trylock() (with its > > backwards return codes) in 2.6.27, but it's creating something of a > > logjam with other patches in -mm and linux-next. > > > > Andrew suggested introducing "down_try" as a wrapper now, to make > > the transition easier. > > The transition to WHAT? To crap? > The naming is pretty sad, but the inconsistent return value from down_trylock() drives me batshit. It means that every time I ever look at any sort of trylock call I need to go back to the definition site to work out if it's the one which returns true or if it's the one which returns false. It would be good to get that fixed. And if we _do_ want to fix it, I don't see any alternative to creating a new function. -- 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/