batman-adv: fix locking in hash_add()
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 8 May 2012 20:31:57 +0000 (22:31 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Mon, 18 Jun 2012 16:01:06 +0000 (18:01 +0200)
commit75c5a2e788ab02f67931442e8dcbc854ae7252d1
treef1ae84324fe9990fa8b04edd17384e644d8cb73b
parentef3a409391f55ad0bddbf017d4d4987b783a3059
batman-adv: fix locking in hash_add()

To ensure an entry isn't added twice all comparisons have to be protected by the
hash line write spinlock. This doesn't really hurt as the case that it is tried
to add an element already present to the hash shouldn't occur very often, so in
most cases the lock would have have to be taken anyways.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/hash.h