FAT: Fix build under KDEBUG_LEVEL < 2.

For now, use ASSERT_ALWAYS in a few places.
This commit is contained in:
Augustin Cavalier
2024-07-30 10:56:37 -04:00
parent a05359e4dd
commit f99ca9a5a2
3 changed files with 3 additions and 3 deletions
@@ -128,7 +128,7 @@ _bwrite(struct buf* buf)
ASSERT((fatNode->de_Attributes & ATTR_READONLY) == 0);
fileOffset = de_cn2off(fatVolume, buf->b_lblkno);
ASSERT((u_long)(fileOffset + buf->b_bufsize) <= fatNode->de_FileSize);
ASSERT_ALWAYS((u_long)(fileOffset + buf->b_bufsize) <= fatNode->de_FileSize);
bytesWritten = (size_t)buf->b_bufsize;
status = file_cache_write(bsdNode->v_cache, NULL, fileOffset, buf->b_data, &bytesWritten);
@@ -71,7 +71,7 @@ vn_vget_ino_gen(struct vnode* vp, vn_get_ino_t alloc, void* alloc_arg, int lkfla
= (uint64)fatVolume->pm_bpcluster * dotdotLocation->cluster + dotdotLocation->blkoff;
status_t status = assign_inode(bsdVolume, (ino_t*)&inode);
ASSERT(status == B_OK && node_exists(bsdVolume, inode));
ASSERT_ALWAYS(status == B_OK && node_exists(bsdVolume, inode));
// It's important that this node has already been constructed.
// If it hasn't, then deget will construct a private node without publishing it to the VFS.
@@ -73,7 +73,7 @@ lockmgr_assert(const struct lock* lk, int what)
{
#ifndef FS_SHELL
if (what == KA_XLOCKED)
ASSERT_WRITE_LOCKED_RW_LOCK(&lk->haikuRW)
ASSERT_WRITE_LOCKED_RW_LOCK(&lk->haikuRW);
else
panic("lockmgr_assert: unrecognized flag\n");
#endif // !FS_SHELL