return (chunk >> et->hash_shift) & et->hash_mask;
}
-static void insert_exception(struct exception_table *eh,
- struct dm_snap_exception *e)
-{
- struct list_head *l = &eh->table[exception_hash(eh, e->old_chunk)];
- list_add(&e->hash_list, l);
-}
-
static void remove_exception(struct dm_snap_exception *e)
{
list_del(&e->hash_list);
atomic_dec(&s->pending_exceptions_count);
}
-static void insert_completed_exception(struct dm_snapshot *s,
- struct dm_snap_exception *new_e)
+static void insert_exception(struct exception_table *eh,
+ struct dm_snap_exception *new_e)
{
- struct exception_table *eh = &s->complete;
struct list_head *l;
struct dm_snap_exception *e = NULL;
/* Consecutive_count is implicitly initialised to zero */
e->new_chunk = new;
- insert_completed_exception(s, e);
+ insert_exception(&s->complete, e);
return 0;
}
* Add a proper exception, and remove the
* in-flight exception from the list.
*/
- insert_completed_exception(s, e);
+ insert_exception(&s->complete, e);
out:
remove_exception(&pe->e);