btrfs-progs: shared: remove debug code from ulist

Sync with kernel sources, we don't define CONFIG_BTRFS_DEBUG in
userspace anyway.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-02-09 16:21:04 +01:00
parent 4049542d4f
commit 390db8a346
2 changed files with 0 additions and 18 deletions

View File

@ -208,9 +208,6 @@ int ulist_add_merge(struct ulist *ulist, u64 val, u64 aux,
node->val = val;
node->aux = aux;
#ifdef CONFIG_BTRFS_DEBUG
node->seqnum = ulist->nnodes;
#endif
ret = ulist_rbtree_insert(ulist, node);
ASSERT(!ret);
@ -275,15 +272,7 @@ struct ulist_node *ulist_next(struct ulist *ulist, struct ulist_iterator *uiter)
uiter->cur_list = uiter->cur_list->next;
} else {
uiter->cur_list = ulist->nodes.next;
#ifdef CONFIG_BTRFS_DEBUG
uiter->i = 0;
#endif
}
node = list_entry(uiter->cur_list, struct ulist_node, list);
#ifdef CONFIG_BTRFS_DEBUG
ASSERT(node->seqnum == uiter->i);
ASSERT(uiter->i >= 0 && uiter->i < ulist->nnodes);
uiter->i++;
#endif
return node;
}

View File

@ -20,9 +20,6 @@
*
*/
struct ulist_iterator {
#ifdef CONFIG_BTRFS_DEBUG
int i;
#endif
struct list_head *cur_list; /* hint to start search */
};
@ -33,10 +30,6 @@ struct ulist_node {
u64 val; /* value to store */
u64 aux; /* auxiliary value saved along with the val */
#ifdef CONFIG_BTRFS_DEBUG
int seqnum; /* sequence number this node is added */
#endif
struct list_head list; /* used to link node */
struct rb_node rb_node; /* used to speed up search */
};