summaryrefslogtreecommitdiffstats
path: root/fs/hfs/bdelete.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /fs/hfs/bdelete.c
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'fs/hfs/bdelete.c')
-rw-r--r--fs/hfs/bdelete.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/hfs/bdelete.c b/fs/hfs/bdelete.c
index 0e47c2737..c968c74b7 100644
--- a/fs/hfs/bdelete.c
+++ b/fs/hfs/bdelete.c
@@ -135,11 +135,16 @@ static int del_root(struct hfs_bnode_ref *root)
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) {