vfs: fix docstring of hash_name()

The docstring of hash_name() is falsely reporting that it returns the
component length, whereas it returns a pointer to the terminating '/'
or NUL character in the pathname being resolved.

Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20260318203953.5770-1-jkoolstra@xs4all.nl
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Jori Koolstra 2026-03-18 21:39:52 +01:00 committed by Christian Brauner
parent bd71fb3fea
commit 8fb6857f2f
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 8 additions and 2 deletions

View File

@ -2437,8 +2437,14 @@ inside:
EXPORT_SYMBOL(hashlen_string); EXPORT_SYMBOL(hashlen_string);
/* /*
* Calculate the length and hash of the path component, and * hash_name - Calculate the length and hash of the path component
* return the length as the result. * @nd: the path resolution state
* @name: the pathname to read the component from
* @lastword: if the component fits in a single word, LAST_WORD_IS_DOT,
* LAST_WORD_IS_DOTDOT, or some other value depending on whether the
* component is '.', '..', or something else. Otherwise, @lastword is 0.
*
* Returns: a pointer to the terminating '/' or NUL character in @name.
*/ */
static inline const char *hash_name(struct nameidata *nd, static inline const char *hash_name(struct nameidata *nd,
const char *name, const char *name,