Skip to content

Commit 8fb6857

Browse files
LATENTBOUNCEbrauner
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent bd71fb3 commit 8fb6857

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

fs/namei.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,8 +2437,14 @@ u64 hashlen_string(const void *salt, const char *name)
24372437
EXPORT_SYMBOL(hashlen_string);
24382438

24392439
/*
2440-
* Calculate the length and hash of the path component, and
2441-
* return the length as the result.
2440+
* hash_name - Calculate the length and hash of the path component
2441+
* @nd: the path resolution state
2442+
* @name: the pathname to read the component from
2443+
* @lastword: if the component fits in a single word, LAST_WORD_IS_DOT,
2444+
* LAST_WORD_IS_DOTDOT, or some other value depending on whether the
2445+
* component is '.', '..', or something else. Otherwise, @lastword is 0.
2446+
*
2447+
* Returns: a pointer to the terminating '/' or NUL character in @name.
24422448
*/
24432449
static inline const char *hash_name(struct nameidata *nd,
24442450
const char *name,

0 commit comments

Comments
 (0)