From 390db8a3468ead9f10a55e35ffd834924a9040d5 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 9 Feb 2017 16:21:04 +0100 Subject: 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 --- kernel-shared/ulist.c | 11 ----------- kernel-shared/ulist.h | 7 ------- 2 files changed, 18 deletions(-) (limited to 'kernel-shared') diff --git a/kernel-shared/ulist.c b/kernel-shared/ulist.c index e25af2de..8853d121 100644 --- a/kernel-shared/ulist.c +++ b/kernel-shared/ulist.c @@ -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; } diff --git a/kernel-shared/ulist.h b/kernel-shared/ulist.h index aa172c5a..1ada7de2 100644 --- a/kernel-shared/ulist.h +++ b/kernel-shared/ulist.h @@ -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 */ }; -- cgit v1.2.3