On Tuesday, May 07, 2013 03:39:52 Antonio Quartulli wrote:
+/**
- batadv_tt_global_entry_free_ref - decrement the refcounter for a
- tt_global_entry and possibly free it
- @tt_global_entry: the object to free
- */
static void batadv_tt_global_entry_free_ref(struct batadv_tt_global_entry *tt_global_entry) { if (atomic_dec_and_test(&tt_global_entry->common.refcount)) { batadv_tt_global_del_orig_list(tt_global_entry);
call_rcu(&tt_global_entry->common.rcu,
batadv_tt_global_entry_free_rcu);
kfree_rcu(tt_global_entry, common.rcu); }
}
You are replacing 2 container_of() calls with a single one. If you are sure that works why doesn't the compat code do that same ?
Cheers, Marek