Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761106AbZLJVY4 (ORCPT ); Thu, 10 Dec 2009 16:24:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760972AbZLJVYy (ORCPT ); Thu, 10 Dec 2009 16:24:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4395 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755457AbZLJVYx (ORCPT ); Thu, 10 Dec 2009 16:24:53 -0500 Date: Thu, 10 Dec 2009 16:24:35 -0500 From: Valerie Aurora To: Erez Zadok Cc: Jan Blunck , Alexander Viro , Christoph Hellwig , Andy Whitcroft , Scott James Remnant , Sandu Popa Marius , Jan Rekorajski , "J. R. Okajima" , Arnd Bergmann , Vladimir Dronnikov , Felix Fietkau , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/41] VFS: Make lookup_hash() return a struct path Message-ID: <20091210212434.GC10388@shell> References: <1256152779-10054-4-git-send-email-vaurora@redhat.com> <200911300604.nAU64D0s021921@agora.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911300604.nAU64D0s021921@agora.fsl.cs.sunysb.edu> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1117 Lines: 27 On Mon, Nov 30, 2009 at 01:04:13AM -0500, Erez Zadok wrote: > In message <1256152779-10054-4-git-send-email-vaurora@redhat.com>, Valerie Aurora writes: > > > @@ -1937,7 +1942,8 @@ EXPORT_SYMBOL(filp_open); > > */ > > struct dentry *lookup_create(struct nameidata *nd, int is_dir) > > { > > - struct dentry *dentry = ERR_PTR(-EEXIST); > > + struct path path = { .dentry = ERR_PTR(-EEXIST) } ; > > I assume the compiler will initialize path.mnt to NULL. Is NULL what you > want? Even if the compiler guarantees it, I think you should either > explicitly init .mnt to NULL or leave a comment explaining what's going on > -- so no future code reader will think that this was omitted; a comment can > clarify your intentions more explicitly. That is an unpleasant thing to look at. I rewrote the exit paths so that this initialization was unnecessary. Thanks, -VAL -- 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/