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:
parent
4049542d4f
commit
390db8a346
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue