* [PATCH] btrfs: Fix BUG_ON for fs converted from extN
@ 2010-05-31 9:04 Yan, Zheng
0 siblings, 0 replies; only message in thread
From: Yan, Zheng @ 2010-05-31 9:04 UTC (permalink / raw)
To: linux-btrfs; +Cc: Chris Mason
Tree blocks can live in data block groups in FS converted from extN.
So it's easy to trigger the BUG_ON.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
---
diff -urp 1/fs/btrfs/extent-tree.c 3/fs/btrfs/extent-tree.c
--- 1/fs/btrfs/extent-tree.c 2010-05-26 23:55:46.610378078 +0800
+++ 3/fs/btrfs/extent-tree.c 2010-05-31 16:36:51.907580723 +0800
@@ -4360,7 +4360,8 @@ void btrfs_free_tree_block(struct btrfs_
block_rsv = get_block_rsv(trans, root);
cache = btrfs_lookup_block_group(root->fs_info, buf->start);
- BUG_ON(block_rsv->space_info != cache->space_info);
+ if (block_rsv->space_info != cache->space_info)
+ goto out;
if (btrfs_header_generation(buf) == trans->transid) {
if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-31 9:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 9:04 [PATCH] btrfs: Fix BUG_ON for fs converted from extN Yan, Zheng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.