-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
static struct it_node {
struct interval_node node;
- cfs_list_t list;
+ struct list_head list;
int hit, valid;
} *it_array;
static int it_count;
-static CFS_LIST_HEAD(header);
+static struct list_head header = LIST_HEAD_INIT(header);
static unsigned long max_count = ULONG_MAX & ALIGN_MASK;
static int have_wide_lock = 0;
/* list */
contended_count = 0;
gettimeofday(&start, NULL);
- cfs_list_for_each_entry(n, &header, list) {
+ list_for_each_entry(n, &header, list) {
if (extent_overlapped(&ext, &n->node.in_extent)) {
count = LOOP_COUNT;
while (count--);
__F(&n->node.in_extent));
interval_erase(&n->node, &root);
n->valid = 0;
- cfs_list_del_init(&n->list);
+ list_del_init(&n->list);
} else {
__u64 low, high;
low = (random() % max_count) & ALIGN_MASK;
dprintf("Adding a node "__S"\n",
__F(&n->node.in_extent));
n->valid = 1;
- cfs_list_add(&n->list, &header);
+ list_add(&n->list, &header);
}
}
n->hit = 0;
n->valid = 1;
if (i == 0)
- cfs_list_add_tail(&n->list, &header);
+ list_add_tail(&n->list, &header);
else
- cfs_list_add_tail(&n->list, &it_array[rand()%i].list);
+ list_add_tail(&n->list, &it_array[rand()%i].list);
}
return root;