Searched hist:"6 f99528e9797794b91b43321fbbc93fe772b0803" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/include/linux/ |
H A D | rtnetlink.h | diff 6f99528e9797794b91b43321fbbc93fe772b0803 Mon Sep 24 11:22:49 CDT 2018 Vlad Buslov <vladbu@mellanox.com> net: core: netlink: add helper refcount dec and lock function
Rtnl lock is encapsulated in netlink and cannot be accessed by other modules directly. This means that reference counted objects that rely on rtnl lock cannot use it with refcounter helper function that atomically releases decrements reference and obtains mutex.
This patch implements simple wrapper function around refcount_dec_and_lock that obtains rtnl lock if reference counter value reached 0.
Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
/openbmc/linux/net/core/ |
H A D | rtnetlink.c | diff 6f99528e9797794b91b43321fbbc93fe772b0803 Mon Sep 24 11:22:49 CDT 2018 Vlad Buslov <vladbu@mellanox.com> net: core: netlink: add helper refcount dec and lock function
Rtnl lock is encapsulated in netlink and cannot be accessed by other modules directly. This means that reference counted objects that rely on rtnl lock cannot use it with refcounter helper function that atomically releases decrements reference and obtains mutex.
This patch implements simple wrapper function around refcount_dec_and_lock that obtains rtnl lock if reference counter value reached 0.
Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|