Re: [PATCH 01/14] quota: Add callbacks for allocating and destroying dquot structures

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

 



On Mon 27-10-08 22:33:57, Andrew Morton wrote:
> On Mon, 27 Oct 2008 13:11:39 +0100 Jan Kara <jack@xxxxxxx> wrote:
> 
> > +static void destroy_dquot(struct dquot *dquot)
> > +{
> > +	if (dquot->dq_sb->dq_op->destroy_dquot)
> > +		dquot->dq_sb->dq_op->destroy_dquot(dquot);
> > +	else
> > +		kmem_cache_free(dquot_cachep, dquot);
> > +}
> 
> Could we require that all dquot_operations.destroy_dquot() be non-NULL?
> Make it point at
> 
> void default_destroy_dquot(struct dquot *dquot)
> {
> 	kmem_cache_fre(...);
> }
> 
> (and ditto dquot_operations.alloc_qduot).
> 
> That way the above becomes a simple inlined function with no `if'.
  Makes sence. Will do. Thanks.

							Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux