Re: [PATCH 6/13: eCryptfs] Superblock operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/4/06, Phillip Hellewell <[email protected]> wrote:
> > > +kmem_cache_t *ecryptfs_inode_info_cache;
> >
> > Please use struct kmem_cache instead of the typedef.

On Thu, 2006-05-04 at 10:00 -0500, Michael Thompson wrote:
> Please explain why. Looking at the source shows that kmem_cache_t is
> more widely used, and therefore seems to be the prefered way.

That's because the typedef is deprecated. See commit
2109a2d1b175dfcffbfdac693bdbe4c4ab62f11f "[PATCH] mm: rename
kmem_cache_s to kmem_cache".

> > > +/**
> > > + * Set up the ecryptfs inode.
> > > + */
> > > +static void ecryptfs_read_inode(struct inode *inode)
> > > +{
> > > +       ecryptfs_printk(KERN_DEBUG, "Enter; inode = [%p]\n", inode);
> > > +       /* This is where we setup the self-reference in the vfs_inode's
> > > +        * u.generic_ip. That way we don't have to walk the list again. */
> > > +       ECRYPTFS_INODE_TO_PRIVATE_SM(inode) =
> > > +               list_entry(inode, struct ecryptfs_inode_info, vfs_inode);
> > > +       ECRYPTFS_INODE_TO_LOWER(inode) = NULL;
> >
> > Hmm, ugly, please make the setters explicit instead.
> 
> Curious, what exactly do you mean by this? I'm not sure what you mean
> by "setters".

That

 +       ECRYPTFS_INODE_TO_LOWER(inode) = NULL;

should be either

         ecryptfs_set_lower_inode(inode, NULL);

or

         inode->lower = NULL;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux