diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp b/src/add-ons/kernel/file_systems/bfs/Journal.cpp index 05757ba96f..09ff73f6a7 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -996,6 +996,8 @@ Journal::Unlock(Transaction* owner, bool success) status_t status = _TransactionDone(success); if (status != B_OK) return status; + + fOwner->UnlockInodes(success); } fTimestamp = system_time(); @@ -1178,7 +1180,7 @@ Transaction::RemoveInode(Inode* inode) void -Transaction::_UnlockInodes(bool success) +Transaction::UnlockInodes(bool success) { while (Inode* inode = fLockedInodes.RemoveHead()) { if (success) { diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.h b/src/add-ons/kernel/file_systems/bfs/Journal.h index 9ebe797941..b867cb0009 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.h +++ b/src/add-ons/kernel/file_systems/bfs/Journal.h @@ -110,10 +110,8 @@ public: ~Transaction() { - if (fJournal != NULL) { + if (fJournal != NULL) fJournal->Unlock(this, false); - _UnlockInodes(false); - } } status_t Start(Volume* volume, off_t refBlock); @@ -124,10 +122,8 @@ public: status_t status = B_OK; if (fJournal != NULL) { status = fJournal->Unlock(this, true); - if (status == B_OK) { - _UnlockInodes(true); + if (status == B_OK) fJournal = NULL; - } } return status; } @@ -183,13 +179,13 @@ public: void AddInode(Inode* inode); void RemoveInode(Inode* inode); + void UnlockInodes(bool success); + private: Transaction(const Transaction& other); Transaction& operator=(const Transaction& other); // no implementation - void _UnlockInodes(bool success); - Journal* fJournal; InodeList fLockedInodes; };