Prev: [PATCH] Netfilter: Fix some coding styles and remove moduleparam.h
Next: sysfs: simplify handling for s_active refcount
From: Eric W. Biederman on 26 Mar 2010 00:30 NeilBrown <neilb(a)suse.de> writes: > s_count in sysfs behaves exactly like a kref, so change it to > be one. > This requires adding a KREF_INIT macro to kref.h Except where it doesn't. The whole no_recurse thing is definitely not idiomatic kref usage. I could find only 3 instances of someone even looking at the return value. I would argue based on that the return value of kref_put should be removed. KREF_INIT if we want it should be added in a separate patch. kref should be kept for the stupid simple cases where so we don't have to think about refcounting, and just know it works. kref should not be where we are getting clever, and it this feels like getting clever to me. It isn't like the atomic primitives are any worse than kref. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |