From: David Sterba Date: Thu, 9 Feb 2017 15:21:04 +0000 (+0100) Subject: btrfs-progs: shared: remove debug code from ulist X-Git-Tag: upstream/4.16.1~784 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390db8a3468ead9f10a55e35ffd834924a9040d5;p=platform%2Fupstream%2Fbtrfs-progs.git 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 --- diff --git a/kernel-shared/ulist.c b/kernel-shared/ulist.c index e25af2d..8853d12 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 aa172c5..1ada7de 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 */ };