diff options
| author | David Laight <[email protected]> | 2023-12-29 20:53:49 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2023-12-30 10:25:51 -0800 |
| commit | 7c223098212957a1ecd8768e8e747ae2cf88e880 (patch) | |
| tree | 5b971c46e74a4d0f405d2120e1c38bccff490773 /kernel | |
| parent | f016f7547aeedefed9450499d002ba983b8fce15 (diff) | |
locking/osq_lock: Move the definition of optimistic_spin_node into osq_lock.c
struct optimistic_spin_node is private to the implementation.
Move it into the C file to ensure nothing is accessing it.
Signed-off-by: David Laight <[email protected]>
Acked-by: Waiman Long <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/locking/osq_lock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/locking/osq_lock.c b/kernel/locking/osq_lock.c index d5610ad52b92..d414eef4bec6 100644 --- a/kernel/locking/osq_lock.c +++ b/kernel/locking/osq_lock.c @@ -11,6 +11,13 @@ * called from interrupt context and we have preemption disabled while * spinning. */ + +struct optimistic_spin_node { + struct optimistic_spin_node *next, *prev; + int locked; /* 1 if lock acquired */ + int cpu; /* encoded CPU # + 1 value */ +}; + static DEFINE_PER_CPU_SHARED_ALIGNED(struct optimistic_spin_node, osq_node); /* |