rhashtable: involve rhashtable_lookup_insert routine
authorYing Xue <ying.xue@windriver.com>
Wed, 7 Jan 2015 05:41:54 +0000 (13:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jan 2015 03:47:11 +0000 (19:47 -0800)
commitdb30485408326a6f466a843b291b23535f63eda0
tree42d8c8e2b515c03f6c054a27e6d8b9aa9c634284
parent54c5b7d311c8e1801f9dcce9f388a7420a25fa90
rhashtable: involve rhashtable_lookup_insert routine

Involve a new function called rhashtable_lookup_insert() which makes
lookup and insertion atomic under bucket lock protection, helping us
avoid to introduce an extra lock when we search and insert an object
into hash table.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/rhashtable.h
lib/rhashtable.c