patch-2.2.0-pre1 linux/fs/hfs/bdelete.c

Next file: linux/fs/hfs/extent.c
Previous file: linux/fs/hfs/ChangeLog
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.132/linux/fs/hfs/bdelete.c linux/fs/hfs/bdelete.c
@@ -135,11 +135,16 @@
 
 		tree->bthRoot = child.bn->node;
 		tree->root = child.bn;
+
+		/* re-assign bthFNode and bthLNode if the new root is
+                   a leaf node. */
+		if (child.bn->ndType == ndLeafNode) {
+			tree->bthFNode = node;
+			tree->bthLNode = node;
+		}
 		hfs_bnode_relse(&child);
 
 		tree->bthRoot = node;
-		tree->bthFNode = node;
-		tree->bthLNode = node;
 		--tree->bthDepth;
 		tree->dirt = 1;
 		if (!tree->bthDepth) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov