Browse Source

JFS: kernel BUG at fs/jfs/jfs_txnmgr.c:859

add_missing_indices() must set tlck->type to tlckBTROOT when modifying
a root btree root to avoid a trap in txRelease()

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Dave Kleikamp 20 years ago
parent
commit
c2731509cf
1 changed files with 3 additions and 0 deletions
  1. 3 0
      fs/jfs/jfs_dtree.c

+ 3 - 0
fs/jfs/jfs_dtree.c

@@ -2931,6 +2931,9 @@ static void add_missing_indices(struct inode *inode, s64 bn)
 	ASSERT(p->header.flag & BT_LEAF);
 
 	tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY);
+	if (BT_IS_ROOT(mp))
+		tlck->type |= tlckBTROOT;
+
 	dtlck = (struct dt_lock *) &tlck->lock;
 
 	stbl = DT_GETSTBL(p);