[lkml]   [2006]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 02/16] GFS2: Core locking interface

    >> >Unfortunately thats not possible as the struct gfs2_sbd is actually
    >> >changed lower down the call chain, but only in the lock_dlm module.
    >> +void gfs2_lm_unmount(struct gfs2_sbd *sdp)
    >> +{
    >> + if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
    >> + gfs2_unmount_lockproto(&sdp->sd_lockstruct);
    >> +}
    >> I can't follow... test_bit does not modify *sdp or sdp->sd_flags, and
    >> gfs2_unmount_lockproto does not either.
    >sd_lockstruct is part of the superblock and fields in the lockstruct are
    >changed by (for example) fs/gfs2/locking/dlm/mount.c: gdlm_unmount() so
    >I don't think its valid to mark the superblock const here (despite being
    >a great fan of using const in general).

    Ah I just looked, and saw that

    struct {
    struct ... sd_lockstruct;
    } sdp;

    sd_lockstruct is not a pointer but a struct in line. Yes, you are right.
    It would have been valid only if sd_lockstruct was a pointer to non-const

    Jan Engelhardt
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-09-04 19:59    [W:0.020 / U:2.224 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site