aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-01 13:18:37 -0500
committerIan Moffett <ian@osmora.org>2024-03-01 13:18:37 -0500
commita31024156aebcc2f58d849970efcce50ede58c1c (patch)
tree673a3215763a73a9f68050d3cd8ed4eae6fb4e0d /sys/kern/vfs_subr.c
parent13bb57688e25836d85c9290b84ca5e0b38e7c83c (diff)
kernel: vfs: Fix logic bug in vfs_hash_path()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 277cf7b..6646f79 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -77,13 +77,13 @@ vfs_hash_path(const char *path)
return 0;
}
- while (name != NULL) {
+ do {
name = vfs_get_fname_at(path, i++);
if (name != NULL) {
hash += vfs_hash(name);
dynfree(name);
}
- }
+ } while (name != NULL);
return hash;
}