lkml.org 
[lkml]   [2006]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-09-04 09:11    [W:2.785 / U:0.392 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site