[PATCH trivial] init: Fix comment typo in do_mounts_initrd.c

Beibei Yang posted 1 patch 2 months ago
init/do_mounts_initrd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH trivial] init: Fix comment typo in do_mounts_initrd.c
Posted by Beibei Yang 2 months ago
From: root <root@192.168.220.227>

The original comment incorrectly used "cwd" (current working directory)
when referring to the root change operation. The correct term should be
"pwd" (present working directory) as per process context semantics.

This is a pure comment correction with no functional impact.

Signed-off-by: Beibei Yang <13738176232@163.com>
---
 init/do_mounts_initrd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index f6867ba..173b569 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -107,7 +107,7 @@ static void __init handle_initrd(char *root_device_name)
 
 	/* move initrd to rootfs' /old */
 	init_mount("..", ".", NULL, MS_MOVE, NULL);
-	/* switch root and cwd back to / of rootfs */
+	/* switch root and pwd back to / of rootfs */
 	init_chroot("..");
 
 	if (new_decode_dev(real_root_dev) == Root_RAM0) {
-- 
1.8.3.1
Re: [PATCH trivial] init: Fix comment typo in do_mounts_initrd.c
Posted by Christian Brauner 2 months ago
On Sun, Aug 03, 2025 at 07:29:18AM -0700, Beibei Yang wrote:
> From: root <root@192.168.220.227>
> 
> The original comment incorrectly used "cwd" (current working directory)
> when referring to the root change operation. The correct term should be
> "pwd" (present working directory) as per process context semantics.
> 
> This is a pure comment correction with no functional impact.
> 
> Signed-off-by: Beibei Yang <13738176232@163.com>
> ---

Didn't I reply to the same thing just a few weeks ago?
Not worth it imho. cwd is equally well understood as pwd.