On Friday 19 June 2015 15:09:18 Marek Lindner wrote:
spin_lock_bh(&bat_priv->tt.req_list_lock);
list_del(&tt_req_node->list);
/* only remove tt_req_node if it still is in the list */
if (!hlist_unhashed(&tt_req_node->list))
spin_unlock_bh(&bat_priv->tt.req_list_lock); kfree(tt_req_node); }hlist_del_init(&tt_req_node->list);
hlist_del_init doesn't require the hlist_unhashed check because this is already done inside of this function [1].
Kind regards, Sven
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include...