aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2024-01-23 17:08:53 +0000
committerJakub Kicinski <[email protected]>2024-01-27 04:34:24 +0000
commit97af84a6bba2ab2b9c704c08e67de3b5ea551bb2 (patch)
tree98c6d7b27da12a158a85b02f68f1204594b70dcc /include/net/af_unix.h
parentaf_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc(). (diff)
downloadkernel-97af84a6bba2ab2b9c704c08e67de3b5ea551bb2.tar.gz
kernel-97af84a6bba2ab2b9c704c08e67de3b5ea551bb2.zip
af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
When touching unix_sk(sk)->inflight, we are always under spin_lock(&unix_gc_lock). Let's convert unix_sk(sk)->inflight to the normal unsigned long. Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'include/net/af_unix.h')
-rw-r--r--include/net/af_unix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 49c4640027d8..ac38b63db554 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -61,7 +61,7 @@ struct unix_sock {
struct mutex iolock, bindlock;
struct sock *peer;
struct list_head link;
- atomic_long_t inflight;
+ unsigned long inflight;
spinlock_t lock;
unsigned long gc_flags;
#define UNIX_GC_CANDIDATE 0