diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-01 13:18:37 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-01 13:18:37 -0500 |
commit | a31024156aebcc2f58d849970efcce50ede58c1c (patch) | |
tree | 673a3215763a73a9f68050d3cd8ed4eae6fb4e0d /sys/kern | |
parent | 13bb57688e25836d85c9290b84ca5e0b38e7c83c (diff) |
kernel: vfs: Fix logic bug in vfs_hash_path()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 4 |
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; } |