public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de, kaos@sgi.com,
	Stephen Rothwell <sfr@au1.ibm.com>,
	rolandd@cisco.com, "Brian S. Julin" <bri@calyx.com>,
	Martin Diehl <info@mdiehl.de>,
	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 <willy@linux.intel.com>
Subject: Re: [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values.
Date: Mon, 5 May 2008 01:58:23 -0400	[thread overview]
Message-ID: <20080505055823.GA20970@infradead.org> (raw)
In-Reply-To: <200805051156.36437.rusty@rustcorp.com.au>

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)


  reply	other threads:[~2008-05-05  5:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05  1:56 [PATCH 1/1] Replace down_trylock() with down_try(), reverse return values Rusty Russell
2008-05-05  5:58 ` Christoph Hellwig [this message]
2008-05-05  6:09   ` Rusty Russell
2008-05-05  6:12     ` Christoph Hellwig
2008-05-05  6:26       ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080505055823.GA20970@infradead.org \
    --to=hch@infradead.org \
    --cc=aacraid@adaptec.com \
    --cc=bri@calyx.com \
    --cc=gregkh@suse.de \
    --cc=info@mdiehl.de \
    --cc=kaos@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=mokuno@sm.sony.co.jp \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=rolandd@cisco.com \
    --cc=rusty@rustcorp.com.au \
    --cc=sfr@au1.ibm.com \
    --cc=willy@linux.intel.com \
    --cc=wim@iguana.be \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox