All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Christoph Hellwig <hch@infradead.org>
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 16:09:12 +1000	[thread overview]
Message-ID: <200805051609.13731.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20080505055823.GA20970@infradead.org>

On Monday 05 May 2008 15:58:23 Christoph Hellwig wrote:
> 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.
>
> 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.

If it goes away before the 2.6.27 merge window, great.  But I don't see that 
happening, so let's clean up this horror.  I cc'd all the people effected in 
the hope that it will prod some of them towards mutexes anyway.

> (And I also really hate the name down_try, but when it goes away that's
>  rather void and we can spare the discussion)

Ideas?  down() is pretty bad, down_try() matches it.

Thanks,
Rusty.

  reply	other threads:[~2008-05-05  6:09 UTC|newest]

Thread overview: 7+ 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  1:56 ` Rusty Russell
2008-05-05  1:56 ` Rusty Russell
2008-05-05  5:58 ` Christoph Hellwig
2008-05-05  6:09   ` Rusty Russell [this message]
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=200805051609.13731.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=aacraid@adaptec.com \
    --cc=bri@calyx.com \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.