From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820AbYEEF6i (ORCPT ); Mon, 5 May 2008 01:58:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752950AbYEEF62 (ORCPT ); Mon, 5 May 2008 01:58:28 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:47314 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752889AbYEEF61 (ORCPT ); Mon, 5 May 2008 01:58:27 -0400 Date: Mon, 5 May 2008 01:58:23 -0400 From: Christoph Hellwig To: Rusty Russell Cc: linux-kernel@vger.kernel.org, gregkh@suse.de, kaos@sgi.com, Stephen Rothwell , rolandd@cisco.com, "Brian S. Julin" , Martin Diehl , mokuno@sm.sony.co.jp, aacraid@adaptec.com, mfasheh@suse.com, wim@iguana.be, xfs@oss.sgi.com, reiserfs-devel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values. Message-ID: <20080505055823.GA20970@infradead.org> References: <200805051156.36437.rusty@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805051156.36437.rusty@rustcorp.com.au> User-Agent: Mutt/1.5.17 (2007-11-01) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 05, 2008 at 01:56:35AM +0000, Rusty Russell wrote: > > down_trylock() returns 1 on failure, 0 on success. This differs from > spin_trylock(), mutex_trylock() and common sense. Or as ocfs2 put it > "kernel 1, world 0". > > Rename it to down_try() (which makes more sense anyway), and reverse > it. Fortunately there aren't a huge number of callers left. > > I took the liberty of reversing the sense of usb_trylock_device() > without renaming it: it's only used in one place anyway. Given that people are actively trying to kill struct semaphore I don't think doing a big search and rename is a good idea right now. (And I also really hate the name down_try, but when it goes away that's rather void and we can spare the discussion)