aboutsummaryrefslogtreecommitdiffstats
path: root/extent-cache.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-03-24 15:03:18 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-03-24 15:03:18 -0400
commit510be296772108b6d5ae829d76cef2b1a1690262 (patch)
tree39cfcefb9891552b388a04e0b5c05b1228f1716e /extent-cache.c
parent00eb6ff6566816982903eb8c817606d6961c61ea (diff)
downloadbtrfs-progs-510be296772108b6d5ae829d76cef2b1a1690262.tar.gz
btrfs-progs-510be296772108b6d5ae829d76cef2b1a1690262.tar.xz
btrfs-progs-510be296772108b6d5ae829d76cef2b1a1690262.zip
Add support for multiple devices per filesystem
Diffstat (limited to 'extent-cache.c')
-rw-r--r--extent-cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/extent-cache.c b/extent-cache.c
index 4e6d1b2..b871e18 100644
--- a/extent-cache.c
+++ b/extent-cache.c
@@ -96,10 +96,13 @@ int insert_existing_cache_extent(struct cache_tree *tree,
struct cache_extent *pe)
{
struct rb_node *found;
+ struct cache_extent *entry;
found = tree_insert(&tree->root, pe->start, pe->size, &pe->rb_node);
- if (found)
+ if (found) {
+ entry = rb_entry(found, struct cache_extent, rb_node);
return -EEXIST;
+ }
return 0;
}