diff options
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 224fb5b3daad..a29f19384a27 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -786,7 +786,6 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, | |||
786 | { | 786 | { |
787 | struct inode *dir; | 787 | struct inode *dir; |
788 | int ret; | 788 | int ret; |
789 | struct btrfs_key location; | ||
790 | struct btrfs_inode_ref *ref; | 789 | struct btrfs_inode_ref *ref; |
791 | struct btrfs_dir_item *di; | 790 | struct btrfs_dir_item *di; |
792 | struct inode *inode; | 791 | struct inode *inode; |
@@ -795,10 +794,6 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, | |||
795 | unsigned long ref_ptr; | 794 | unsigned long ref_ptr; |
796 | unsigned long ref_end; | 795 | unsigned long ref_end; |
797 | 796 | ||
798 | location.objectid = key->objectid; | ||
799 | location.type = BTRFS_INODE_ITEM_KEY; | ||
800 | location.offset = 0; | ||
801 | |||
802 | /* | 797 | /* |
803 | * it is possible that we didn't log all the parent directories | 798 | * it is possible that we didn't log all the parent directories |
804 | * for a given inode. If we don't find the dir, just don't | 799 | * for a given inode. If we don't find the dir, just don't |
@@ -1583,7 +1578,6 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb, | |||
1583 | struct btrfs_path *path; | 1578 | struct btrfs_path *path; |
1584 | struct btrfs_root *root = wc->replay_dest; | 1579 | struct btrfs_root *root = wc->replay_dest; |
1585 | struct btrfs_key key; | 1580 | struct btrfs_key key; |
1586 | u32 item_size; | ||
1587 | int level; | 1581 | int level; |
1588 | int i; | 1582 | int i; |
1589 | int ret; | 1583 | int ret; |
@@ -1601,7 +1595,6 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb, | |||
1601 | nritems = btrfs_header_nritems(eb); | 1595 | nritems = btrfs_header_nritems(eb); |
1602 | for (i = 0; i < nritems; i++) { | 1596 | for (i = 0; i < nritems; i++) { |
1603 | btrfs_item_key_to_cpu(eb, &key, i); | 1597 | btrfs_item_key_to_cpu(eb, &key, i); |
1604 | item_size = btrfs_item_size_nr(eb, i); | ||
1605 | 1598 | ||
1606 | /* inode keys are done during the first stage */ | 1599 | /* inode keys are done during the first stage */ |
1607 | if (key.type == BTRFS_INODE_ITEM_KEY && | 1600 | if (key.type == BTRFS_INODE_ITEM_KEY && |
@@ -1668,7 +1661,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, | |||
1668 | struct walk_control *wc) | 1661 | struct walk_control *wc) |
1669 | { | 1662 | { |
1670 | u64 root_owner; | 1663 | u64 root_owner; |
1671 | u64 root_gen; | ||
1672 | u64 bytenr; | 1664 | u64 bytenr; |
1673 | u64 ptr_gen; | 1665 | u64 ptr_gen; |
1674 | struct extent_buffer *next; | 1666 | struct extent_buffer *next; |
@@ -1698,7 +1690,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, | |||
1698 | 1690 | ||
1699 | parent = path->nodes[*level]; | 1691 | parent = path->nodes[*level]; |
1700 | root_owner = btrfs_header_owner(parent); | 1692 | root_owner = btrfs_header_owner(parent); |
1701 | root_gen = btrfs_header_generation(parent); | ||
1702 | 1693 | ||
1703 | next = btrfs_find_create_tree_block(root, bytenr, blocksize); | 1694 | next = btrfs_find_create_tree_block(root, bytenr, blocksize); |
1704 | 1695 | ||
@@ -1749,7 +1740,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, | |||
1749 | struct walk_control *wc) | 1740 | struct walk_control *wc) |
1750 | { | 1741 | { |
1751 | u64 root_owner; | 1742 | u64 root_owner; |
1752 | u64 root_gen; | ||
1753 | int i; | 1743 | int i; |
1754 | int slot; | 1744 | int slot; |
1755 | int ret; | 1745 | int ret; |
@@ -1757,8 +1747,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, | |||
1757 | for (i = *level; i < BTRFS_MAX_LEVEL - 1 && path->nodes[i]; i++) { | 1747 | for (i = *level; i < BTRFS_MAX_LEVEL - 1 && path->nodes[i]; i++) { |
1758 | slot = path->slots[i]; | 1748 | slot = path->slots[i]; |
1759 | if (slot + 1 < btrfs_header_nritems(path->nodes[i])) { | 1749 | if (slot + 1 < btrfs_header_nritems(path->nodes[i])) { |
1760 | struct extent_buffer *node; | ||
1761 | node = path->nodes[i]; | ||
1762 | path->slots[i]++; | 1750 | path->slots[i]++; |
1763 | *level = i; | 1751 | *level = i; |
1764 | WARN_ON(*level == 0); | 1752 | WARN_ON(*level == 0); |
@@ -1771,7 +1759,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, | |||
1771 | parent = path->nodes[*level + 1]; | 1759 | parent = path->nodes[*level + 1]; |
1772 | 1760 | ||
1773 | root_owner = btrfs_header_owner(parent); | 1761 | root_owner = btrfs_header_owner(parent); |
1774 | root_gen = btrfs_header_generation(parent); | ||
1775 | wc->process_func(root, path->nodes[*level], wc, | 1762 | wc->process_func(root, path->nodes[*level], wc, |
1776 | btrfs_header_generation(path->nodes[*level])); | 1763 | btrfs_header_generation(path->nodes[*level])); |
1777 | if (wc->free) { | 1764 | if (wc->free) { |
@@ -2729,7 +2716,6 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, | |||
2729 | struct btrfs_key max_key; | 2716 | struct btrfs_key max_key; |
2730 | struct btrfs_root *log = root->log_root; | 2717 | struct btrfs_root *log = root->log_root; |
2731 | struct extent_buffer *src = NULL; | 2718 | struct extent_buffer *src = NULL; |
2732 | u32 size; | ||
2733 | int err = 0; | 2719 | int err = 0; |
2734 | int ret; | 2720 | int ret; |
2735 | int nritems; | 2721 | int nritems; |
@@ -2793,7 +2779,6 @@ again: | |||
2793 | break; | 2779 | break; |
2794 | 2780 | ||
2795 | src = path->nodes[0]; | 2781 | src = path->nodes[0]; |
2796 | size = btrfs_item_size_nr(src, path->slots[0]); | ||
2797 | if (ins_nr && ins_start_slot + ins_nr == path->slots[0]) { | 2782 | if (ins_nr && ins_start_slot + ins_nr == path->slots[0]) { |
2798 | ins_nr++; | 2783 | ins_nr++; |
2799 | goto next_slot; | 2784 | goto next_slot; |