[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250818172235.178899-1-seokwoo.chung130@gmail.com>
Date: Tue, 19 Aug 2025 02:22:35 +0900
From: Ryan Chung <seokwoo.chung130@...il.com>
To: viro@...iv.linux.org.uk,
brauner@...nel.org,
jack@...e.cz
Cc: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linux.dev,
Ryan Chung <seokwoo.chung130@...il.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] fs/namespace.c: fix mountpath handling in do_lock_mount()
Updates documentation for do_lock_mount() in fs/namespace.c
to clarify its parameters and return description to fix
warning reported by syzbot.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506301911.uysRaP8b-lkp@intel.com/
Signed-off-by: Ryan Chung <seokwoo.chung130@...il.com>
---
fs/namespace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index ddfd4457d338..577fdff9f1a8 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2741,6 +2741,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
/**
* do_lock_mount - lock mount and mountpoint
* @path: target path
+ * @pinned: on success, holds a pin guarding the mountpoint
* @beneath: whether the intention is to mount beneath @path
*
* Follow the mount stack on @path until the top mount @mnt is found. If
@@ -2769,8 +2770,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
* to @mnt->mnt_mp->m_dentry. But if @mnt has been unmounted it will
* point to @mnt->mnt_root and @mnt->mnt_mp will be NULL.
*
- * Return: Either the target mountpoint on the top mount or the top
- * mount's mountpoint.
+ * Return: On success, 0 is returned. On failure, err is returned.
*/
static int do_lock_mount(struct path *path, struct pinned_mountpoint *pinned, bool beneath)
{
--
2.43.0
Powered by blists - more mailing lists