Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967111Ab3E2XC2 (ORCPT ); Wed, 29 May 2013 19:02:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50986 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966322Ab3E2XCV (ORCPT ); Wed, 29 May 2013 19:02:21 -0400 Date: Wed, 29 May 2013 16:01:49 -0700 From: Zach Brown To: Miklos Szeredi Cc: Linux-Fsdevel , Kernel Mailing List , Al Viro , Linus Torvalds , Christoph Hellwig , Andrew Morton , David Howells Subject: Re: [RFC PATCH] vfs: add permute operation Message-ID: <20130529230149.GJ2363@lenny.home.zabbo.net> References: <20130527153313.GC1842@tucsk.piliscsaba.szeredi.hu> <20130528173631.GB2363@lenny.home.zabbo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 696 Lines: 18 > >> +static void sort_parents3(struct dentry **p) > >> +void sort_parents(struct dentry **p, unsigned *nump) > > > > Yikes, that's a bunch of fiddly code. Is it *really* worth all that to > > avoid calling the generic sort helpers? > > AFAICS, I cannot make the compare function transitive, e.g.: A is > descendant of C but B is unrelated. Then what should cmp(A, B) and > cmp(B, C) return? Ah, of course. I wasn't reading closely enough. - z -- 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/