From nobody Tue Apr 7 16:15:39 2026 Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4FA63BF668 for ; Thu, 12 Mar 2026 11:28:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.121.94.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773314928; cv=none; b=Qc9wbySXncs1BosD4C0GxHq3QH3iybO5+jPPlGbBRLh84VaMrumJVu3r/qbUSz/F0Q8byaL+PIBb+FFOw9edZR+yVxrHVknP4vIJ0jH6jQ2xsZUQwZxWLsdsRCOGq6HSDaXOkZghyw+c1ZkGOx2qxCOMsEJ8yXZolYVSgeJ5xrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773314928; c=relaxed/simple; bh=lt/r6MXMYH8YpKX4OoRYvXc/lVnY6s/EQRrqUdvsvwY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LPC5A4Qy0g4IY8HZH5NqC6gqkw8K7EN6Mc33HZTsgnKa8oRT338hv4Ga2OvKvs5gkZ5iQ4np6lEB5VOOR3/e3IaQumHEPR/J8IPSRiMlwp8ASng06JbP4v3I+1PO9fYyOafsvjQearv9oKgIztwUgjL/LTc20jtXy9ep0cik4E4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xs4all.nl; spf=pass smtp.mailfrom=xs4all.nl; dkim=pass (2048-bit key) header.d=xs4all.nl header.i=@xs4all.nl header.b=E2xuALVe; arc=none smtp.client-ip=195.121.94.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=xs4all.nl header.i=@xs4all.nl header.b="E2xuALVe" X-KPN-MessageId: 9d2c3698-1e06-11f1-8a98-005056ab378f Received: from smtp.kpnmail.nl (unknown [10.31.155.38]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 9d2c3698-1e06-11f1-8a98-005056ab378f; Thu, 12 Mar 2026 12:28:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=mime-version:message-id:date:subject:to:from; bh=jvAYsc0JVs7m61kxcR/1TCveuyrIzgf82MvZGPDbG0Q=; b=E2xuALVe2JNvPFzVIkq7Ks1HdIydNAQguc2K6cLWwJ/MCDOnBYObtlQ1TiIB9o61u6nnskiNF104z 2Iw4BC52Z3I+N79XyE1NgbizO+xbOzbpXsmonwV1/nFIiXJwx3YLw043E27F5SFt7y5SLkC63oQrGG ZTNew29tLDkQmU7xsWvAB/RR3thEgVgJuPgse4Qn7mS9olIKgZU9Wbpjo3B816EvxrJlDdu2ROAeWj 95T0oo/hq2CKxrd55uDK/gwJ2z2+jtYicX7HzfdJ3Rfqwp6PVaA7i3oWSB1+bgn7OiVJYa46GLV/aB kCDaVCEqfhy7q5WLqklIVOBiyQvhrMg== X-KPN-MID: 33|FxskGi+cEslV8S/DYtiQcOokUd9wG6pmCQeL+eqTFJI7JNeYJD8t3ydxBKAAoLO S+g2dn67uIa2Yzmk3GGzzY/N096p2JKqbUSlwc5/21kY= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|vuoznjx7yA8EWZFRnF5Y7krNJ9U2C/pPzAVBg3irXDFR8PbMej00tu7Yj5RI0ou VmcNYnUvzlwaFc6gxK0t8BA== Received: from lt-jori.home (unknown [178.226.144.191]) by smtp.xs4all.nl (Halon) with ESMTPSA id 99a16004-1e06-11f1-a6cb-005056abf0db; Thu, 12 Mar 2026 12:28:37 +0100 (CET) From: Jori Koolstra To: Alexander Viro , Christian Brauner , Jan Kara Cc: Jori Koolstra , linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] vfs: fix docstring of hash_name() Date: Thu, 12 Mar 2026 12:28:22 +0100 Message-ID: <20260312112823.2801-1-jkoolstra@xs4all.nl> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- fs/namei.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 58f715f7657e..d020b077591b 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2437,8 +2437,13 @@ u64 hashlen_string(const void *salt, const char *nam= e) EXPORT_SYMBOL(hashlen_string); =20 /* - * Calculate the length and hash of the path component, and - * return the length as the result. + * hash_name - Calculate the length and hash of the path component + * @nd: the path resolution state + * @name: the pathname to read the component from + * @lastword: if the component fits in a single word, the component bytes, + * otherwise 0 + * + * Returns: a pointer to the terminating '/' or NUL character in @name. */ static inline const char *hash_name(struct nameidata *nd, const char *name, --=20 2.53.0