Jan Kara <jack@xxxxxxx> writes: > On Mon 26-04-10 19:37:29, Jan Kara wrote: >> 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. > The patch didn't compile for !CONFIG_SMP systems and also broke > /proc/sys/fs/quota/warning file. Dmitry, could you be more careful next > time, please? I've fixed that up and tested that it actually works. > Attached is a resulting patch that I currently carry. Hmm.. i dont wat to say... it was my unpredictable laziness effect. Really sorry for wasting your time in that meaner. Will take more efforts to avoid this in future. -- 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