Lines Matching refs:idx_gc

514 		struct ubifs_gced_idx_leb *idx_gc;  in ubifs_garbage_collect_leb()  local
530 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_garbage_collect_leb()
531 if (!idx_gc) { in ubifs_garbage_collect_leb()
536 idx_gc->lnum = lnum; in ubifs_garbage_collect_leb()
537 idx_gc->unmap = 0; in ubifs_garbage_collect_leb()
538 list_add(&idx_gc->list, &c->idx_gc); in ubifs_garbage_collect_leb()
671 if (i > SOFT_LEBS_LIMIT && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
791 if (ret == -ENOSPC && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
831 struct ubifs_gced_idx_leb *idx_gc; in ubifs_gc_start_commit() local
864 list_for_each_entry(idx_gc, &c->idx_gc, list) in ubifs_gc_start_commit()
865 idx_gc->unmap = 1; in ubifs_gc_start_commit()
876 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_gc_start_commit()
877 if (!idx_gc) { in ubifs_gc_start_commit()
888 kfree(idx_gc); in ubifs_gc_start_commit()
893 idx_gc->lnum = lp->lnum; in ubifs_gc_start_commit()
894 idx_gc->unmap = 1; in ubifs_gc_start_commit()
895 list_add(&idx_gc->list, &c->idx_gc); in ubifs_gc_start_commit()
910 struct ubifs_gced_idx_leb *idx_gc, *tmp; in ubifs_gc_end_commit() local
916 list_for_each_entry_safe(idx_gc, tmp, &c->idx_gc, list) in ubifs_gc_end_commit()
917 if (idx_gc->unmap) { in ubifs_gc_end_commit()
918 dbg_gc("LEB %d", idx_gc->lnum); in ubifs_gc_end_commit()
919 err = ubifs_leb_unmap(c, idx_gc->lnum); in ubifs_gc_end_commit()
922 err = ubifs_change_one_lp(c, idx_gc->lnum, LPROPS_NC, in ubifs_gc_end_commit()
926 list_del(&idx_gc->list); in ubifs_gc_end_commit()
927 kfree(idx_gc); in ubifs_gc_end_commit()
944 while (!list_empty(&c->idx_gc)) { in ubifs_destroy_idx_gc()
945 struct ubifs_gced_idx_leb *idx_gc; in ubifs_destroy_idx_gc() local
947 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, in ubifs_destroy_idx_gc()
950 list_del(&idx_gc->list); in ubifs_destroy_idx_gc()
951 kfree(idx_gc); in ubifs_destroy_idx_gc()
963 struct ubifs_gced_idx_leb *idx_gc; in ubifs_get_idx_gc_leb() local
966 if (list_empty(&c->idx_gc)) in ubifs_get_idx_gc_leb()
968 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, list); in ubifs_get_idx_gc_leb()
969 lnum = idx_gc->lnum; in ubifs_get_idx_gc_leb()
971 list_del(&idx_gc->list); in ubifs_get_idx_gc_leb()
972 kfree(idx_gc); in ubifs_get_idx_gc_leb()