From a76c4f11d5449ae1485a49f1959a575f2756248a Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Mon, 11 May 2026 23:23:07 +1200 Subject: [PATCH] bfs: don't try to create indices when there's no indices root. During partition initialization, the indices root is always created unless `VOLUME_NO_INDICES` is passed in the `initialize_parameters`. Due to stricter vnode checks, a BFS volume with `VOLUME_NO_INDICES` was trying to create an index despite there being no index root, which seems to have been silently swallowed in the past. Now, when attempting to create an index, do a similar check as other index operations to ensure an index root node exists, or fail. Fixes #20083. Change-Id: Ida317743b865a27498d8be11a18c06f3b7579dd7 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10971 Tested-by: Commit checker robot Haiku-Format: Haiku-format Bot Reviewed-by: waddlesplash --- src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp index 980d97e1ea..548b9bd13b 100644 --- a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp @@ -2172,6 +2172,10 @@ bfs_create_index(fs_volume* _volume, const char* name, uint32 type, if (geteuid() != 0) return B_NOT_ALLOWED; + Inode* indices = volume->IndicesNode(); + if (indices == NULL) + return B_UNSUPPORTED; + Transaction transaction(volume, volume->Indices()); Index index(volume);