Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jori Koolstra and committed by
Christian Brauner
8fb6857f bd71fb3f

+8 -2
+8 -2
fs/namei.c
··· 2437 2437 EXPORT_SYMBOL(hashlen_string); 2438 2438 2439 2439 /* 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. 2442 2448 */ 2443 2449 static inline const char *hash_name(struct nameidata *nd, 2444 2450 const char *name,