Loading fs/btrfs/ctree.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -1195,8 +1195,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, * returns the logical address of the oldest predecessor of the given root. * returns the logical address of the oldest predecessor of the given root. * entries older than time_seq are ignored. * entries older than time_seq are ignored. */ */ static struct tree_mod_elem * static struct tree_mod_elem *__tree_mod_log_oldest_root( __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info, struct extent_buffer *eb_root, u64 time_seq) struct extent_buffer *eb_root, u64 time_seq) { { struct tree_mod_elem *tm; struct tree_mod_elem *tm; Loading @@ -1214,7 +1213,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info, * first operation that's logged for this root. * first operation that's logged for this root. */ */ while (1) { while (1) { tm = tree_mod_log_search_oldest(fs_info, root_logical, tm = tree_mod_log_search_oldest(eb_root->fs_info, root_logical, time_seq); time_seq); if (!looped && !tm) if (!looped && !tm) return NULL; return NULL; Loading Loading @@ -1404,7 +1403,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq) u64 logical; u64 logical; eb_root = btrfs_read_lock_root_node(root); eb_root = btrfs_read_lock_root_node(root); tm = __tree_mod_log_oldest_root(fs_info, eb_root, time_seq); tm = __tree_mod_log_oldest_root(eb_root, time_seq); if (!tm) if (!tm) return eb_root; return eb_root; Loading Loading @@ -1468,7 +1467,7 @@ int btrfs_old_root_level(struct btrfs_root *root, u64 time_seq) int level; int level; struct extent_buffer *eb_root = btrfs_root_node(root); struct extent_buffer *eb_root = btrfs_root_node(root); tm = __tree_mod_log_oldest_root(root->fs_info, eb_root, time_seq); tm = __tree_mod_log_oldest_root(eb_root, time_seq); if (tm && tm->op == MOD_LOG_ROOT_REPLACE) { if (tm && tm->op == MOD_LOG_ROOT_REPLACE) { level = tm->old_root.level; level = tm->old_root.level; } else { } else { Loading Loading
fs/btrfs/ctree.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -1195,8 +1195,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, * returns the logical address of the oldest predecessor of the given root. * returns the logical address of the oldest predecessor of the given root. * entries older than time_seq are ignored. * entries older than time_seq are ignored. */ */ static struct tree_mod_elem * static struct tree_mod_elem *__tree_mod_log_oldest_root( __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info, struct extent_buffer *eb_root, u64 time_seq) struct extent_buffer *eb_root, u64 time_seq) { { struct tree_mod_elem *tm; struct tree_mod_elem *tm; Loading @@ -1214,7 +1213,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info, * first operation that's logged for this root. * first operation that's logged for this root. */ */ while (1) { while (1) { tm = tree_mod_log_search_oldest(fs_info, root_logical, tm = tree_mod_log_search_oldest(eb_root->fs_info, root_logical, time_seq); time_seq); if (!looped && !tm) if (!looped && !tm) return NULL; return NULL; Loading Loading @@ -1404,7 +1403,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq) u64 logical; u64 logical; eb_root = btrfs_read_lock_root_node(root); eb_root = btrfs_read_lock_root_node(root); tm = __tree_mod_log_oldest_root(fs_info, eb_root, time_seq); tm = __tree_mod_log_oldest_root(eb_root, time_seq); if (!tm) if (!tm) return eb_root; return eb_root; Loading Loading @@ -1468,7 +1467,7 @@ int btrfs_old_root_level(struct btrfs_root *root, u64 time_seq) int level; int level; struct extent_buffer *eb_root = btrfs_root_node(root); struct extent_buffer *eb_root = btrfs_root_node(root); tm = __tree_mod_log_oldest_root(root->fs_info, eb_root, time_seq); tm = __tree_mod_log_oldest_root(eb_root, time_seq); if (tm && tm->op == MOD_LOG_ROOT_REPLACE) { if (tm && tm->op == MOD_LOG_ROOT_REPLACE) { level = tm->old_root.level; level = tm->old_root.level; } else { } else { Loading