From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Tue, 7 May 2013 04:29:46 +0800 References: <1367869192-3322-1-git-send-email-ordex@autistici.org> In-Reply-To: <1367869192-3322-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201305070429.46317.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: don't use call_rcu if not needed Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking 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