diff options
author | Alexander Block <ablock84@googlemail.com> | 2012-06-19 09:42:25 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-06-21 07:19:34 -0400 |
commit | 1c8f52a5e9539600543347bcdefafa1854e07986 (patch) | |
tree | 52b3bd5283ea390ad8d8e7ce6837944dea109ef7 /fs | |
parent | a8c4a33b98b097e69cd1a10672c43d17ad0ffb25 (diff) |
Btrfs: introduce btrfs_next_old_item
We introduce btrfs_next_old_item that uses btrfs_next_old_leaf instead
of btrfs_next_leaf.
btrfs_next_item is also changed to simply call btrfs_next_old_item with
time_seq being 0.
Signed-off-by: Alexander Block <ablock84@googlemail.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index db15e9e7b91c..84ac723f58f8 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2755,13 +2755,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, | |||
2755 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2755 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); |
2756 | int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, | 2756 | int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, |
2757 | u64 time_seq); | 2757 | u64 time_seq); |
2758 | static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) | 2758 | static inline int btrfs_next_old_item(struct btrfs_root *root, |
2759 | struct btrfs_path *p, u64 time_seq) | ||
2759 | { | 2760 | { |
2760 | ++p->slots[0]; | 2761 | ++p->slots[0]; |
2761 | if (p->slots[0] >= btrfs_header_nritems(p->nodes[0])) | 2762 | if (p->slots[0] >= btrfs_header_nritems(p->nodes[0])) |
2762 | return btrfs_next_leaf(root, p); | 2763 | return btrfs_next_old_leaf(root, p, time_seq); |
2763 | return 0; | 2764 | return 0; |
2764 | } | 2765 | } |
2766 | static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) | ||
2767 | { | ||
2768 | return btrfs_next_old_item(root, p, 0); | ||
2769 | } | ||
2765 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2770 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); |
2766 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); | 2771 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); |
2767 | int __must_check btrfs_drop_snapshot(struct btrfs_root *root, | 2772 | int __must_check btrfs_drop_snapshot(struct btrfs_root *root, |