diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-23 14:37:47 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-23 14:37:47 -0400 |
commit | d6c0cb379c5198487e4ac124728cbb2346d63b1f (patch) | |
tree | 167a97ac58c7a2fbf7c4e94b6abbfe1e03af014a /fs/btrfs/extent-tree.c | |
parent | 8e531cdfeb75269c6c5aae33651cca39707848da (diff) | |
parent | 1f78160ce1b1b8e657e2248118c4d91f881763f0 (diff) |
Merge branch 'cleanups_and_fixes' into inode_numbers
Conflicts:
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 98ca149bdbc8..169bd62ce776 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -952,7 +952,6 @@ static int convert_extent_item_v0(struct btrfs_trans_handle *trans, | |||
952 | BUG_ON(ret); | 952 | BUG_ON(ret); |
953 | 953 | ||
954 | ret = btrfs_extend_item(trans, root, path, new_size); | 954 | ret = btrfs_extend_item(trans, root, path, new_size); |
955 | BUG_ON(ret); | ||
956 | 955 | ||
957 | leaf = path->nodes[0]; | 956 | leaf = path->nodes[0]; |
958 | item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); | 957 | item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); |
@@ -1560,7 +1559,6 @@ int setup_inline_extent_backref(struct btrfs_trans_handle *trans, | |||
1560 | size = btrfs_extent_inline_ref_size(type); | 1559 | size = btrfs_extent_inline_ref_size(type); |
1561 | 1560 | ||
1562 | ret = btrfs_extend_item(trans, root, path, size); | 1561 | ret = btrfs_extend_item(trans, root, path, size); |
1563 | BUG_ON(ret); | ||
1564 | 1562 | ||
1565 | ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); | 1563 | ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); |
1566 | refs = btrfs_extent_refs(leaf, ei); | 1564 | refs = btrfs_extent_refs(leaf, ei); |
@@ -1689,7 +1687,6 @@ int update_inline_extent_backref(struct btrfs_trans_handle *trans, | |||
1689 | end - ptr - size); | 1687 | end - ptr - size); |
1690 | item_size -= size; | 1688 | item_size -= size; |
1691 | ret = btrfs_truncate_item(trans, root, path, item_size, 1); | 1689 | ret = btrfs_truncate_item(trans, root, path, item_size, 1); |
1692 | BUG_ON(ret); | ||
1693 | } | 1690 | } |
1694 | btrfs_mark_buffer_dirty(leaf); | 1691 | btrfs_mark_buffer_dirty(leaf); |
1695 | return 0; | 1692 | return 0; |
@@ -3307,6 +3304,10 @@ static int shrink_delalloc(struct btrfs_trans_handle *trans, | |||
3307 | if (reserved == 0) | 3304 | if (reserved == 0) |
3308 | return 0; | 3305 | return 0; |
3309 | 3306 | ||
3307 | /* nothing to shrink - nothing to reclaim */ | ||
3308 | if (root->fs_info->delalloc_bytes == 0) | ||
3309 | return 0; | ||
3310 | |||
3310 | max_reclaim = min(reserved, to_reclaim); | 3311 | max_reclaim = min(reserved, to_reclaim); |
3311 | 3312 | ||
3312 | while (loops < 1024) { | 3313 | while (loops < 1024) { |