public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] locking: fix typos in comments
@ 2026-04-16  9:04 Xiang Gao
  2026-04-16 15:06 ` Waiman Long
  2026-04-16 15:11 ` Dmitry Ilvokhin
  0 siblings, 2 replies; 3+ messages in thread
From: Xiang Gao @ 2026-04-16  9:04 UTC (permalink / raw)
  To: peterz, mingo, will, boqun; +Cc: longman, linux-kernel, Xiang Gao

From: Xiang Gao <gaoxiang17@xiaomi.com>

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 <gaoxiang17@xiaomi.com>
---
 kernel/locking/mutex.c | 6 +++---
 kernel/locking/rwsem.c | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 186b463fe326..658cebc0958d 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -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);
diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c
index bf647097369c..016d69053ce4 100644
--- a/kernel/locking/rwsem.c
+++ b/kernel/locking/rwsem.c
@@ -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();
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] locking: fix typos in comments
  2026-04-16  9:04 [PATCH] locking: fix typos in comments Xiang Gao
@ 2026-04-16 15:06 ` Waiman Long
  2026-04-16 15:11 ` Dmitry Ilvokhin
  1 sibling, 0 replies; 3+ messages in thread
From: Waiman Long @ 2026-04-16 15:06 UTC (permalink / raw)
  To: Xiang Gao, peterz, mingo, will, boqun; +Cc: linux-kernel, Xiang Gao


On 4/16/26 5:04 AM, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
>
> 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 <gaoxiang17@xiaomi.com>
> ---
>   kernel/locking/mutex.c | 6 +++---
>   kernel/locking/rwsem.c | 8 ++++----
>   2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> index 186b463fe326..658cebc0958d 100644
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -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);
> diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c
> index bf647097369c..016d69053ce4 100644
> --- a/kernel/locking/rwsem.c
> +++ b/kernel/locking/rwsem.c
> @@ -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();
Acked-by: Waiman Long <longman@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] locking: fix typos in comments
  2026-04-16  9:04 [PATCH] locking: fix typos in comments Xiang Gao
  2026-04-16 15:06 ` Waiman Long
@ 2026-04-16 15:11 ` Dmitry Ilvokhin
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Ilvokhin @ 2026-04-16 15:11 UTC (permalink / raw)
  To: Xiang Gao; +Cc: peterz, mingo, will, boqun, longman, linux-kernel, Xiang Gao

On Thu, Apr 16, 2026 at 05:04:07PM +0800, Xiang Gao wrote:
> From: Xiang Gao <gaoxiang17@xiaomi.com>
> 
> 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 <gaoxiang17@xiaomi.com>

Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-16 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16  9:04 [PATCH] locking: fix typos in comments Xiang Gao
2026-04-16 15:06 ` Waiman Long
2026-04-16 15:11 ` Dmitry Ilvokhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox