summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-01-04 17:21:48 +0900
committerPaolo Abeni <pabeni@redhat.com>2025-01-07 13:45:53 +0100
commit7bd72a4aa226c3ef752bcd6b33c54f6e85efcc60 (patch)
tree2a637e9154bbe8df9fd9a2aa9e9bc6ceff7f0d9d /include/linux
parent2f4f8893e07a58073b250ca1f07163efdca87ba9 (diff)
rtnetlink: Add rtnl_net_lock_killable().
rtnl_lock_killable() is used only in register_netdev() and will be converted to per-netns RTNL. Let's unexport it and add the corresponding helper. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rtnetlink.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 3b9d132cbc9e..4bc2ee0b10b0 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -102,6 +102,7 @@ void __rtnl_net_unlock(struct net *net);
void rtnl_net_lock(struct net *net);
void rtnl_net_unlock(struct net *net);
int rtnl_net_trylock(struct net *net);
+int rtnl_net_lock_killable(struct net *net);
int rtnl_net_lock_cmp_fn(const struct lockdep_map *a, const struct lockdep_map *b);
bool rtnl_net_is_locked(struct net *net);
@@ -138,6 +139,11 @@ static inline int rtnl_net_trylock(struct net *net)
return rtnl_trylock();
}
+static inline int rtnl_net_lock_killable(struct net *net)
+{
+ return rtnl_lock_killable();
+}
+
static inline void ASSERT_RTNL_NET(struct net *net)
{
ASSERT_RTNL();