lkml.org 
[lkml]   [2006]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 12/22][RFC] Unionfs: Main module functions

    >+/* checks if two hidden_dentries have overlapping branches */
    >+int is_branch_overlap(struct dentry *dent1, struct dentry *dent2)
    >+{
    >+ struct dentry *dent = NULL;
    >+
    >+ dent = dent1;
    >+ while ((dent != dent2) && (dent->d_parent != dent)) {
    >+ dent = dent->d_parent;
    >+ }
    >+ if (dent == dent2) {
    >+ return 1;
    >+ }
    >+
    >+ dent = dent2;
    >+ while ((dent != dent1) && (dent->d_parent != dent)) {
    >+ dent = dent->d_parent;
    >+ }
    >+ if (dent == dent1) {
    >+ return 1;
    >+ }
    >+
    >+ return 0;
    >+}
    -()-{} Also elsewhere.

    >+ struct dentry *dent1 = NULL;
    >+ struct dentry *dent2 = NULL;

    Is it necessary to set these to NULL?

    >+ for (i = 0; i < branches; i++) {
    >+ if (hidden_root_info->udi_dentry[i])
    >+ dput(hidden_root_info->udi_dentry[i]);
    >+ }


    >+MODULE_AUTHOR("Filesystems and Storage Lab, Stony Brook University"
    >+ " (http://www.fsl.cs.sunysb.edu/)");

    Should probably have at least one human person in the list.


    Jan Engelhardt
    --

    --
    VGER BF report: H 4.15867e-12
    -
    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:35    [W:0.022 / U:90.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site