*/
void ofd_seqs_free(const struct lu_env *env, struct ofd_device *ofd)
{
- struct ofd_seq *oseq;
- struct ofd_seq *tmp;
- struct list_head dispose;
+ struct ofd_seq *oseq;
+ struct ofd_seq *tmp;
+ LIST_HEAD(dispose);
- INIT_LIST_HEAD(&dispose);
write_lock(&ofd->ofd_seq_list_lock);
list_for_each_entry_safe(oseq, tmp, &ofd->ofd_seq_list, os_list)
list_move(&oseq->os_list, &dispose);
write_unlock(&ofd->ofd_seq_list_lock);
while (!list_empty(&dispose)) {
- oseq = container_of0(dispose.next, struct ofd_seq, os_list);
+ oseq = container_of(dispose.next, struct ofd_seq, os_list);
list_del_init(&oseq->os_list);
ofd_seq_put(env, oseq);
}
mutex_init(&oseq->os_create_lock);
spin_lock_init(&oseq->os_last_oid_lock);
ostid_set_seq(&oseq->os_oi, seq);
+ oseq->os_last_id_synced = 0;
atomic_set(&oseq->os_refc, 1);
+ atomic_set(&oseq->os_precreate_in_progress, 0);
rc = dt_attr_get(env, dob, &info->fti_attr);
if (rc)