splinter work on generic fs notification framework

David Woodhouse dwmw2 at infradead.org
Wed Jul 13 08:40:52 UTC 2005


On Tue, 2005-07-12 at 12:55 -0700, Greg KH wrote:
> > +struct watch {
> > +     atomic_t                w_count;
> 
> Use a struct kref instead of rolling your own here.

Please don't. It's perfectly reasonable as it is, without making out of
line function calls where the prologue is bigger than the function
itself.

And _especially_ don't use it for places where the refcount had other
locking and didn't even need to be atomic.

-- 
dwmw2




More information about the Linux-audit mailing list