locking: fix typos in comments
PATCH 1/1 locking: fix typos in comments
From: Xiang Gao <[email protected]>
Fix the following typos in comments:
mutex.c: "crital" -> "critical" (2 instances) mutex.c: "task_strcut" -> "task_struct" (2 instances) rwsem.c: "Otherwisee" -> "Otherwise" rwsem.c: "crital" -> "critical" (2 instances) rwsem.c: "task_strcut" -> "task_struct"
--- kernel/locking/mutex.c | 6 +++--- kernel/locking/rwsem.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
kernel/locking/mutex.c +3 -3
@@ -380,8 +380,8 @@ bool mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner,* Ensure we emit the owner->on_cpu, dereference _after_ * checking lock->owner still matches owner. And we already * disabled preemption which is equal to the RCU read-side -* crital section in optimistic spinning code. Thus the -* task_strcut structure won't go away during the spinning +* critical section in optimistic spinning code. Thus the +* task_struct structure won't go away during the spinning * period */ barrier ();
@@ -420,7 +420,7 @@ static inline int mutex_can_spin_on_owner(struct mutex *lock)/* * We already disabled preemption which is equal to the RCU read-side -* crital section in optimistic spinning code. Thus the task_strcut +* critical section in optimistic spinning code. Thus the task_struct * structure won't go away during the spinning period. */ owner =__mutex_owner (lock);
kernel/locking/rwsem.c +4 -4
@@ -638,7 +638,7 @@ static inline bool rwsem_try_write_lock(struct rw_semaphore *sem,if (has_handoff) {/* * Honor handoff bit and yield only when the first -* waiter is the one that set it. Otherwisee, we +* waiter is the one that set it. Otherwise, we * still try to acquire the rwsem. */ if (first->handoff_set && (waiter != first))
@@ -737,8 +737,8 @@ static inline bool rwsem_can_spin_on_owner(struct rw_semaphore *sem) }/* -* Disable preemption is equal to the RCU read-side crital section, -* thus the task_strcut structure won't go away. +* Disable preemption is equal to the RCU read-side critical section, +* thus the task_struct structure won't go away. */ owner =rwsem_owner_flags (sem, &flags);/*
@@ -796,7 +796,7 @@ rwsem_spin_on_owner(struct rw_semaphore *sem)* checking sem->owner still matches owner, if that fails, * owner might point to free()d memory, if it still matches, * our spinning context already disabled preemption which is -* equal to RCU read-side crital section ensures the memory +* equal to RCU read-side critical section ensures the memory * stays valid. */ barrier ();
Signature · 1 line
2.34.1
Quoted 65 lines · Xiang Gao
From: Xiang Gao <[email protected]>
Fix the following typos in comments:
mutex.c: "crital" -> "critical" (2 instances) mutex.c: "task_strcut" -> "task_struct" (2 instances) rwsem.c: "Otherwisee" -> "Otherwise" rwsem.c: "crital" -> "critical" (2 instances) rwsem.c: "task_strcut" -> "task_struct"Signed-off-by Xiang Gao <[email protected]>--- kernel/locking/mutex.c | 6 +++--- kernel/locking/rwsem.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)kernel/locking/mutex.c +3
-3@@ -380,8 +380,8 @@ bool mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner,* Ensure we emit the owner->on_cpu, dereference _after_ * checking lock->owner still matches owner. And we already * disabled preemption which is equal to the RCU read-side -* crital section in optimistic spinning code. Thus the -* task_strcut structure won't go away during the spinning +* critical section in optimistic spinning code. Thus the +* task_struct structure won't go away during the spinning * period */ barrier ();@@ -420,7 +420,7 @@ static inline int mutex_can_spin_on_owner(struct mutex *lock)/* * We already disabled preemption which is equal to the RCU read-side -* crital section in optimistic spinning code. Thus the task_strcut +* critical section in optimistic spinning code. Thus the task_struct * structure won't go away during the spinning period. */ owner =__mutex_owner (lock);kernel/locking/rwsem.c +3
-3@@ -638,7 +638,7 @@ static inline bool rwsem_try_write_lock(struct rw_semaphore *sem,if (has_handoff) {/* * Honor handoff bit and yield only when the first -* waiter is the one that set it. Otherwisee, we +* waiter is the one that set it. Otherwise, we * still try to acquire the rwsem. */ if (first->handoff_set && (waiter != first))@@ -737,8 +737,8 @@ static inline bool rwsem_can_spin_on_owner(struct rw_semaphore *sem) }/* -* Disable preemption is equal to the RCU read-side crital section, -* thus the task_strcut structure won't go away. +* Disable preemption is equal to the RCU read-side critical section, +* thus the task_struct structure won't go away. */ owner =rwsem_owner_flags (sem, &flags);/*
kernel/locking/rwsem.c rwsem_spin_on_owner(struct rw_semaphore *sem) · line 802
Quoted 8 lines
kernel/locking/rwsem.c +1
-1@@ -796,7 +796,7 @@ rwsem_spin_on_owner(struct rw_semaphore *sem)* checking sem->owner still matches owner, if that fails, * owner might point to free()d memory, if it still matches, * our spinning context already disabled preemption which is -* equal to RCU read-side crital section ensures the memory +* equal to RCU read-side critical section ensures the memory * stays valid. */ barrier ();
Quoted 11 lines · Xiang Gao
From: Xiang Gao <[email protected]>
Fix the following typos in comments:
mutex.c: "crital" -> "critical" (2 instances)mutex.c: "task_strcut" -> "task_struct" (2 instances)rwsem.c: "Otherwisee" -> "Otherwise"rwsem.c: "crital" -> "critical" (2 instances)rwsem.c: "task_strcut" -> "task_struct"Signed-off-by Xiang Gao <[email protected]>