fs: use debug-only asserts around fd allocation and install

This also restores the check which got removed in 52732bb9ab
("fs/file.c: remove sanity_check and add likely/unlikely in alloc_fd()")
for performance reasons -- they no longer apply with a debug-only
variant.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20250312161941.1261615-1-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Mateusz Guzik 2025-03-12 17:19:41 +01:00 • committed by Christian Brauner
commit dc530c44cd
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2