Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759416AbYHDFyX (ORCPT ); Mon, 4 Aug 2008 01:54:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753544AbYHDFyP (ORCPT ); Mon, 4 Aug 2008 01:54:15 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:43216 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752916AbYHDFyO (ORCPT ); Mon, 4 Aug 2008 01:54:14 -0400 Date: Sun, 3 Aug 2008 22:53:59 -0700 (PDT) From: Linus Torvalds To: Rusty Russell cc: Paul Menage , linux-kernel@vger.kernel.org, Matthew Wilcox , "Randy.Dunlap" , Andrew Morton , Christoph Hellwig Subject: Re: [PATCH] Introduce down_try() so we can move away from down_trylock() In-Reply-To: <200808041328.45773.rusty@rustcorp.com.au> Message-ID: References: <200807291015.02865.rusty@rustcorp.com.au> <200808041328.45773.rusty@rustcorp.com.au> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 26 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/