mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiang Gao <gxxa03070307@gmail.com>
To: peterz@infradead.org, mingo@redhat.com, will@kernel.org,
	boqun@kernel.org
Cc: longman@redhat.com, linux-kernel@vger.kernel.org,
	Xiang Gao <gaoxiang17@xiaomi.com>
Subject: [PATCH] locking: fix typos in comments
Date: Thu, 16 Apr 2026 17:04:07 +0800	[thread overview]
Message-ID: <20260416090407.930301-1-gxxa03070307@gmail.com> (raw)

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


             reply	other threads:[~2026-04-16  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  9:04 Xiang Gao [this message]
2026-04-16 15:06 ` Waiman Long
2026-04-16 15:11 ` Dmitry Ilvokhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260416090407.930301-1-gxxa03070307@gmail.com \
    --to=gxxa03070307@gmail.com \
    --cc=boqun@kernel.org \
    --cc=gaoxiang17@xiaomi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®