All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: convert tt request list into hlist
Date: Fri, 19 Jun 2015 11:32 +0200	[thread overview]
Message-ID: <1674100.1XU1fCZBAt@bentobox> (raw)
In-Reply-To: <1434697758-8399-1-git-send-email-mareklindner@neomailbox.ch>

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

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))
> +			hlist_del_init(&tt_req_node->list);
>  		spin_unlock_bh(&bat_priv->tt.req_list_lock);
>  		kfree(tt_req_node);
>  	}

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/linux/list.h?id=a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd#n588

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-06-19  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  7:09 [B.A.T.M.A.N.] [PATCH] batman-adv: convert tt request list into hlist Marek Lindner
2015-06-19  8:00 ` Antonio Quartulli
2015-06-19  9:23 ` Sven Eckelmann
2015-06-19  9:32 ` Sven Eckelmann [this message]
2015-06-19  9:43   ` Marek Lindner
2015-06-19  9:43   ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1674100.1XU1fCZBAt@bentobox \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=mareklindner@neomailbox.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.