BFS: Assert in RemovedInodes(), don't just have a comment.

This would've caught the cause of #19953.
This commit is contained in:
Augustin Cavalier
2026-03-05 15:56:48 -05:00
parent 11280e1b51
commit 26f8f18b1c
3 changed files with 11 additions and 3 deletions
@@ -28,10 +28,10 @@ public:
status_t Lock(Transaction* owner,
bool separateSubTransactions);
status_t Unlock(Transaction* owner, bool success);
void AssertLocked() { ASSERT_LOCKED_RECURSIVE(&fLock); }
status_t ReplayLog();
Transaction* CurrentTransaction() const { return fOwner; }
size_t CurrentTransactionSize() const;
bool CurrentTransactionTooLarge() const;
@@ -414,6 +414,15 @@ Volume::WriteSuperBlock()
}
InodeList&
Volume::RemovedInodes()
{
// This list is guarded by the transaction lock.
fJournal->AssertLocked();
return fRemovedInodes;
}
void
Volume::UpdateLiveQueries(Inode* inode, const char* attribute, int32 type,
const uint8* oldKey, size_t oldLength, const uint8* newKey,
+1 -2
View File
@@ -99,8 +99,7 @@ public:
status_t CreateVolumeID(Transaction& transaction);
InodeList& RemovedInodes() { return fRemovedInodes; }
// This list is guarded by the transaction lock
InodeList& RemovedInodes();
// block bitmap
BlockAllocator& Allocator();