Thread (15 messages) 15 messages, 4 authors, 2025-01-22

Re: [PATCH net-next 1/4] net-sysfs: remove rtnl_trylock from device attributes

flat view

From: Antoine Tenart <atenart@kernel.org>
Date: 2025-01-17 18:35:19

Quoting Stephen Hemminger (2025-01-17 18:03:11)
On Fri, 17 Jan 2025 11:26:08 +0100
Antoine Tenart [off-list ref] wrote:
quoted
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 1f4d4b5570ab..7c3a0f79a669 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -80,6 +80,12 @@ void rtnl_lock(void)
 }
 EXPORT_SYMBOL(rtnl_lock);
 
+int rtnl_lock_interruptible(void)
+{
+     return mutex_lock_interruptible(&rtnl_mutex);
+}
+EXPORT_SYMBOL_GPL(rtnl_lock_interruptible);
Is export symbol needed at all? The sysfs stuff isn't in a module.
You're right, this could be removed and only added if/when there is a
use case. The only reason would be for consistence with other similar
helpers but some are not exported already so I guess that's OK.

Thanks,
Antoine
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help