* [PATCH] btrfs: Fix oopsen when dropping empty tree.
@ 2010-02-01 2:41 Yan, Zheng
0 siblings, 0 replies; only message in thread
From: Yan, Zheng @ 2010-02-01 2:41 UTC (permalink / raw)
To: linux-btrfs, chris Mason
When dropping a empty tree, walk_down_tree() skips checking
extent information for the tree root. This will triggers a
BUG_ON in walk_up_proc().
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
---
diff -urp 1/fs/btrfs/extent-tree.c 2/fs/btrfs/extent-tree.c
--- 1/fs/btrfs/extent-tree.c 2010-01-22 12:16:34.203525744 +0800
+++ 2/fs/btrfs/extent-tree.c 2010-02-01 10:26:19.865562007 +0800
@@ -5402,10 +5402,6 @@ static noinline int walk_down_tree(struc
int ret;
while (level >= 0) {
- if (path->slots[level] >=
- btrfs_header_nritems(path->nodes[level]))
- break;
-
ret = walk_down_proc(trans, root, path, wc, lookup_info);
if (ret > 0)
break;
@@ -5413,6 +5409,10 @@ static noinline int walk_down_tree(struc
if (level == 0)
break;
+ if (path->slots[level] >=
+ btrfs_header_nritems(path->nodes[level]))
+ break;
+
ret = do_walk_down(trans, root, path, wc, &lookup_info);
if (ret > 0) {
path->slots[level]++;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-01 2:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01 2:41 [PATCH] btrfs: Fix oopsen when dropping empty tree Yan, Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox