[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0609040859140.9108@yvahk01.tjqt.qr>
Date: Mon, 4 Sep 2006 09:04:21 +0200 (MEST)
From: Jan Engelhardt <jengelh@...ux01.gwdg.de>
To: Josef Sipek <jsipek@...sunysb.edu>
cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
hch@...radead.org, akpm@...l.org, viro@....linux.org.uk
Subject: Re: [PATCH 06/22][RFC] Unionfs: Dentry operations
>+/*
>+ * 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists