On Mon 26-04-10 20:14:24, Dmitry Monakhov wrote: > Jan Kara <jack@xxxxxxx> writes: > > > On Mon 26-04-10 17:16:23, Jan Kara wrote: > >> On Fri 23-04-10 09:31:41, Dmitry Monakhov wrote: > >> > > >> > I've written this patch long time ago, it is pretty simple, and > >> > allow more non obvious locking optimization to be done later. > >> The patch looks OK to me. Will merge it. > > Hmm, maybe I spoke to soon. One question: > > > >> > +void dqstats_inc(unsigned int type) > >> > +{ > >> > +#ifdef CONFIG_SMP > >> > + per_cpu_ptr(dqstats_pcpu, smp_processor_id())->stat[type]++; > >> > +#else > >> > + dqstats[type]++; > >> > +#endif > >> > +} > >> > + > >> > +void dqstats_dec(unsigned int type) > >> > +{ > >> > +#ifdef CONFIG_SMP > >> > + per_cpu_ptr(dqstats_pcpu, smp_processor_id())->stat[type]--; > >> > +#else > >> > + dqstats[type]--; > >> > +#endif > >> > +} > > Why not make these two functions inline? Since they are used > > also from quota_tree.c and quota_v1.c, we'd need to move them to a > > quota.h header in that case. > My initial goal was to keep inc/dec/read helpers together. > We still need to export dqstats_pcpu. But if you prefer this style > i'm ok with it. New version attached. OK, I've merged the new version (with a few whitespace fixes). 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