summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-02 16:08:05 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-02 16:08:05 -0500
commit02217ed299c6340a35696e0610047eb96826de2d (patch)
tree4a92c16ce2a51f701c829d96f644486fb7b29517 /fs/btrfs/disk-io.c
parent77ce6846c40e83193df01295e5af437f8b6c7a2d (diff)
Btrfs: early reference counting
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b1a8149bbc8..0e1c31e682f 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -260,6 +260,8 @@ void tree_block_release(struct ctree_root *root, struct tree_buffer *buf)
if (buf->count < 0)
BUG();
if (buf->count == 0) {
+ BUG_ON(!list_empty(&buf->cache));
+ BUG_ON(!list_empty(&buf->dirty));
if (!radix_tree_lookup(&root->cache_radix, buf->blocknr))
BUG();
radix_tree_delete(&root->cache_radix, buf->blocknr);