| Date | Sun, 20 Aug 2006 10:31:02 +0530 | From | Balbir Singh <> | Subject | Re: [ckrm-tech] [RFC][PATCH 2/7] UBC: core (structures, API) |
| |
> + > +void __put_beancounter(struct user_beancounter *ub) > +{ > + unsigned long flags; > + struct user_beancounter *parent; > + > +again: > + parent = ub->parent; > + /* equevalent to atomic_dec_and_lock_irqsave() */ > + local_irq_save(flags); > + if (likely(!atomic_dec_and_lock(&ub->ub_refcount, &ub_hash_lock))) { > + if (unlikely(atomic_read(&ub->ub_refcount) < 0)) > + printk(KERN_ERR "UB: Bad ub refcount: ub=%p, " > + "luid=%d, ref=%d\n", > + ub, ub->ub_uid, > + atomic_read(&ub->ub_refcount)); > + local_irq_restore(flags); > + return;
Minor comment - the printk (I think there is one other place) could come after the local_irq_restore()
--
Balbir Singh, Linux Technology Center, IBM Software Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|