af_unix: Remove U_LOCK_GC_LISTENER.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Thu, 20 Jun 2024 20:56:19 +0000 (13:56 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Jun 2024 09:10:18 +0000 (11:10 +0200)
Commit 1971d13ffa84 ("af_unix: Suppress false-positive lockdep splat for
spin_lock() in __unix_gc().") added U_LOCK_GC_LISTENER for the old GC,
but it's no longer needed for the new GC.

Let's remove U_LOCK_GC_LISTENER and unix_state_lock_nested() as there's
no user.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/af_unix.h

index c42645199cee3b90f2e1858fa3d4e24f49231086..63129c79b8cbc6413cfc7a1c6f93c4139f7df19c 100644 (file)
@@ -96,18 +96,6 @@ struct unix_sock {
 
 #define unix_state_lock(s)     spin_lock(&unix_sk(s)->lock)
 #define unix_state_unlock(s)   spin_unlock(&unix_sk(s)->lock)
-enum unix_socket_lock_class {
-       U_LOCK_NORMAL,
-       U_LOCK_GC_LISTENER, /* used for listening socket while determining gc
-                            * candidates to close a small race window.
-                            */
-};
-
-static inline void unix_state_lock_nested(struct sock *sk,
-                                  enum unix_socket_lock_class subclass)
-{
-       spin_lock_nested(&unix_sk(sk)->lock, subclass);
-}
 
 #define peer_wait peer_wq.wait