xfs
[Top] [All Lists]

Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return v

To: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 5 May 2008 01:58:23 -0400
Cc: linux-kernel@xxxxxxxxxxxxxxx, gregkh@xxxxxxx, kaos@xxxxxxx, Stephen Rothwell <sfr@xxxxxxxxxxx>, rolandd@xxxxxxxxx, "Brian S. Julin" <bri@xxxxxxxxx>, Martin Diehl <info@xxxxxxxxx>, mokuno@xxxxxxxxxxxxx, aacraid@xxxxxxxxxxx, mfasheh@xxxxxxxx, wim@xxxxxxxxx, xfs@xxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
In-reply-to: <200805051156.36437.rusty@rustcorp.com.au>
References: <200805051156.36437.rusty@rustcorp.com.au>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
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)


<Prev in Thread] Current Thread [Next in Thread>