[sheepdog] [PATCH] object cache: opencode add_to_dirty_tree_and_list()

Christoph Hellwig hch at infradead.org
Tue Jun 12 17:51:36 CEST 2012


I like the split between the allocation and the btree/list addition.
But why not keep a helper for the latter two as they are always
called together?

> +		assert(!dirty_tree_insert(oc->active_dirty_tree, entry));

Calling code with side effects inside assert statements is dangerous
as the assert code can be compiled out using -NDEBUG




More information about the sheepdog mailing list