BFS: Assert in RemovedInodes(), don't just have a comment.
This would've caught the cause of #19953.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user