summaryrefslogtreecommitdiff
path: root/kernel-shared
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-02-09 16:21:04 +0100
committerDavid Sterba <dsterba@suse.com>2017-03-08 13:00:47 +0100
commit390db8a3468ead9f10a55e35ffd834924a9040d5 (patch)
tree39ef548adf5cc260468fe2dd312c7eeb89ee4f62 /kernel-shared
parent4049542d4ffc92e4e12c7a7d03984afbeeff15bb (diff)
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>
Diffstat (limited to 'kernel-shared')
-rw-r--r--kernel-shared/ulist.c11
-rw-r--r--kernel-shared/ulist.h7
2 files changed, 0 insertions, 18 deletions
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 */
};