Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932407AbWIDHIW (ORCPT ); Mon, 4 Sep 2006 03:08:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932405AbWIDHIW (ORCPT ); Mon, 4 Sep 2006 03:08:22 -0400 Received: from mailer.gwdg.de ([134.76.10.26]:47771 "EHLO mailer.gwdg.de") by vger.kernel.org with ESMTP id S932402AbWIDHIU (ORCPT ); Mon, 4 Sep 2006 03:08:20 -0400 Date: Mon, 4 Sep 2006 09:04:21 +0200 (MEST) From: Jan Engelhardt To: Josef Sipek cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, akpm@osdl.org, viro@ftp.linux.org.uk Subject: Re: [PATCH 06/22][RFC] Unionfs: Dentry operations In-Reply-To: <20060901014414.GG5788@fsl.cs.sunysb.edu> Message-ID: References: <20060901013512.GA5788@fsl.cs.sunysb.edu> <20060901014414.GG5788@fsl.cs.sunysb.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1273 Lines: 47 >+/* >+ * THIS IS A BOOLEAN FUNCTION: returns 1 if valid, 0 otherwise. >+ */ Candiate for "generic boolean patch"! >+ if (!restart && (pdgen != sbgen)) { () >+ } else if (dbstart(dentry) < 0) { >+ /* this is due to a failed lookup */ >+ /* the failed lookup has a dtohd_ptr set to null, >+ but this is a better check */ >+ printk(KERN_DEBUG "dentry without hidden dentries : %*s", >+ dentry->d_name.len, dentry->d_name.name); I think you want %.*s >+out_free: >+ /* No need to unlock it, because it is disappeared. */ >+ free_dentry_private_data(dtopd(dentry)); >+ dtopd_lhs(dentry) = NULL; /* just to be safe */ Things like this NULLing could be removed. It if then oopses somewhere, you either (a) needed this =NULL indeed (because some other function depends on it being NULL) or (b) found a bug elsewhere (more likely, since you write "just to be safe") The (a) case is needed if you wanted to kfree(dtopd_lhs(dentry)) elsewhere it. Jan Engelhardt -- -- VGER BF report: H 0.00065657 - 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/