On Fri, 2010-09-10 at 14:47 -0700, Fred Isaman wrote: > On Fri, Sep 10, 2010 at 1:11 PM, Trond Myklebust > <Trond.Myklebust@xxxxxxxxxx> wrote: > > On Thu, 2010-09-02 at 14:00 -0400, Fred Isaman wrote: > >> From: The pNFS Team <linux-nfs@xxxxxxxxxxxxxxx> > >> static void > >> init_lseg(struct pnfs_layout_hdr *lo, struct pnfs_layout_segment *lseg) > >> { > >> @@ -191,7 +210,7 @@ destroy_lseg(struct kref *kref) > >> struct pnfs_layout_hdr *local = lseg->layout; > >> > >> dprintk("--> %s\n", __func__); > >> - kfree(lseg); > >> + PNFS_LD_IO_OPS(local)->free_lseg(lseg); > > > > Where is PNFS_LD_IO_OPS() defined? Besides, I thought we agreed to get > > rid of that. > > This is defined in pnfs.h as > PNFS_NFS_SERVER()->pnfs_curr_ld->ld_io_iops, mainly to save typing. It may save typing in the short term, but long-term it mainly serves to hide the various levels of indirection. I'd prefer to have the latter obvious to people in order to encourage them to think more carefully about how to avoid recalculating these values over and over again. Cheers Trond -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html