diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-16 08:56:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-16 08:56:18 -0400 |
commit | 88fd146c27da0f34c512f47e2b3776a0762ecd81 (patch) | |
tree | b9edfbb99674dcd8ad036f04664b96e92f62719a /fs/btrfs/ctree.c | |
parent | a8a2ee0c600a213d13170c2f4d7bd0b304bbec19 (diff) |
Btrfs: pin freed blocks from the FS tree too
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 68f66b320a88..13128b5ed65c 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -55,13 +55,13 @@ static int btrfs_cow_block(struct btrfs_root *root, | |||
55 | root->node = cow; | 55 | root->node = cow; |
56 | cow->count++; | 56 | cow->count++; |
57 | if (buf != root->commit_root) | 57 | if (buf != root->commit_root) |
58 | btrfs_free_extent(root, buf->blocknr, 1); | 58 | btrfs_free_extent(root, buf->blocknr, 1, 1); |
59 | btrfs_block_release(root, buf); | 59 | btrfs_block_release(root, buf); |
60 | } else { | 60 | } else { |
61 | btrfs_set_node_blockptr(&parent->node, parent_slot, | 61 | btrfs_set_node_blockptr(&parent->node, parent_slot, |
62 | cow->blocknr); | 62 | cow->blocknr); |
63 | BUG_ON(list_empty(&parent->dirty)); | 63 | BUG_ON(list_empty(&parent->dirty)); |
64 | btrfs_free_extent(root, buf->blocknr, 1); | 64 | btrfs_free_extent(root, buf->blocknr, 1, 1); |
65 | } | 65 | } |
66 | btrfs_block_release(root, buf); | 66 | btrfs_block_release(root, buf); |
67 | return 0; | 67 | return 0; |
@@ -311,7 +311,7 @@ static int balance_level(struct btrfs_root *root, struct btrfs_path *path, | |||
311 | /* once for the root ptr */ | 311 | /* once for the root ptr */ |
312 | btrfs_block_release(root, mid_buf); | 312 | btrfs_block_release(root, mid_buf); |
313 | clean_tree_block(root, mid_buf); | 313 | clean_tree_block(root, mid_buf); |
314 | return btrfs_free_extent(root, blocknr, 1); | 314 | return btrfs_free_extent(root, blocknr, 1, 1); |
315 | } | 315 | } |
316 | parent = &parent_buf->node; | 316 | parent = &parent_buf->node; |
317 | 317 | ||
@@ -352,7 +352,7 @@ static int balance_level(struct btrfs_root *root, struct btrfs_path *path, | |||
352 | wret = del_ptr(root, path, level + 1, pslot + 1); | 352 | wret = del_ptr(root, path, level + 1, pslot + 1); |
353 | if (wret) | 353 | if (wret) |
354 | ret = wret; | 354 | ret = wret; |
355 | wret = btrfs_free_extent(root, blocknr, 1); | 355 | wret = btrfs_free_extent(root, blocknr, 1, 1); |
356 | if (wret) | 356 | if (wret) |
357 | ret = wret; | 357 | ret = wret; |
358 | } else { | 358 | } else { |
@@ -388,7 +388,7 @@ static int balance_level(struct btrfs_root *root, struct btrfs_path *path, | |||
388 | wret = del_ptr(root, path, level + 1, pslot); | 388 | wret = del_ptr(root, path, level + 1, pslot); |
389 | if (wret) | 389 | if (wret) |
390 | ret = wret; | 390 | ret = wret; |
391 | wret = btrfs_free_extent(root, blocknr, 1); | 391 | wret = btrfs_free_extent(root, blocknr, 1, 1); |
392 | if (wret) | 392 | if (wret) |
393 | ret = wret; | 393 | ret = wret; |
394 | } else { | 394 | } else { |
@@ -1310,7 +1310,7 @@ int btrfs_del_item(struct btrfs_root *root, struct btrfs_path *path) | |||
1310 | wret = del_ptr(root, path, 1, path->slots[1]); | 1310 | wret = del_ptr(root, path, 1, path->slots[1]); |
1311 | if (wret) | 1311 | if (wret) |
1312 | ret = wret; | 1312 | ret = wret; |
1313 | wret = btrfs_free_extent(root, leaf_buf->blocknr, 1); | 1313 | wret = btrfs_free_extent(root, leaf_buf->blocknr, 1, 1); |
1314 | if (wret) | 1314 | if (wret) |
1315 | ret = wret; | 1315 | ret = wret; |
1316 | } | 1316 | } |
@@ -1348,7 +1348,7 @@ int btrfs_del_item(struct btrfs_root *root, struct btrfs_path *path) | |||
1348 | if (wret) | 1348 | if (wret) |
1349 | ret = wret; | 1349 | ret = wret; |
1350 | btrfs_block_release(root, leaf_buf); | 1350 | btrfs_block_release(root, leaf_buf); |
1351 | wret = btrfs_free_extent(root, blocknr, 1); | 1351 | wret = btrfs_free_extent(root, blocknr, 1, 1); |
1352 | if (wret) | 1352 | if (wret) |
1353 | ret = wret; | 1353 | ret = wret; |
1354 | } else { | 1354 | } else { |