Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932444AbbEFHW2 (ORCPT ); Wed, 6 May 2015 03:22:28 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:43370 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbbEFHW1 (ORCPT ); Wed, 6 May 2015 03:22:27 -0400 Date: Wed, 6 May 2015 08:22:15 +0100 From: Al Viro To: NeilBrown Cc: Linus Torvalds , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 47/79] namei: move link/cookie pairs into nameidata Message-ID: <20150506072215.GW889@ZenIV.linux.org.uk> References: <20150505052205.GS889@ZenIV.linux.org.uk> <1430803373-4948-47-git-send-email-viro@ZenIV.linux.org.uk> <20150506124254.5c28e4c6@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150506124254.5c28e4c6@notabene.brown> 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: 760 Lines: 20 On Wed, May 06, 2015 at 12:42:54PM +1000, NeilBrown wrote: > > static int link_path_walk(const char *name, struct nameidata *nd) > > { > > - struct saved { > > - struct path link; > > - void *cookie; > > - const char *name; > > - } stack[MAX_NESTED_LINKS], *last = stack + nd->depth - 1; > > + struct saved *last = nd->stack; > > This looks wrong. 'last' used to be dependent on nd->depth, now it isn't. On the entry to link_path_walk() we have nd->depth == 0. And nd->depth and last are changed in sync. -- 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/