[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0808032251050.3668@nehalem.linux-foundation.org>
Date: Sun, 3 Aug 2008 22:53:59 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Rusty Russell <rusty@...tcorp.com.au>
cc: Paul Menage <menage@...gle.com>, linux-kernel@...r.kernel.org,
Matthew Wilcox <matthew@....cx>,
"Randy.Dunlap" <rdunlap@...otime.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] Introduce down_try() so we can move away from
down_trylock()
On Mon, 4 Aug 2008, Rusty Russell wrote:
>
> Someone sent me a patch documenting the illogic of down_trylock(). I decided
> to try to fix it rather than just bitch and moan.
I do agree that it is illogical. I just think your solution is worse than
the problem - turning one illogical function into a redundant one seems
the worse problem.
We could just fix the return value, since it's not used very much, but
we'd obviously never know what out-of-tree users there might be, so that's
not really a good solution either. But that's obviously why we'd then have
to rename it to something else, so whichever way we turn, we'd just be
screwed.
I'm much happier telling people to "just don't use semaphores any more".
The _legacy_ users get down_trylock() right.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists