Lines Matching refs:idx_gc
546 struct ubifs_gced_idx_leb *idx_gc; in ubifs_garbage_collect_leb() local
562 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_garbage_collect_leb()
563 if (!idx_gc) { in ubifs_garbage_collect_leb()
568 idx_gc->lnum = lnum; in ubifs_garbage_collect_leb()
569 idx_gc->unmap = 0; in ubifs_garbage_collect_leb()
570 list_add(&idx_gc->list, &c->idx_gc); in ubifs_garbage_collect_leb()
706 if (i > SOFT_LEBS_LIMIT && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
837 if (ret == -ENOSPC && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
878 struct ubifs_gced_idx_leb *idx_gc; in ubifs_gc_start_commit() local
907 list_for_each_entry(idx_gc, &c->idx_gc, list) in ubifs_gc_start_commit()
908 idx_gc->unmap = 1; in ubifs_gc_start_commit()
919 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_gc_start_commit()
920 if (!idx_gc) { in ubifs_gc_start_commit()
931 kfree(idx_gc); in ubifs_gc_start_commit()
936 idx_gc->lnum = lp->lnum; in ubifs_gc_start_commit()
937 idx_gc->unmap = 1; in ubifs_gc_start_commit()
938 list_add(&idx_gc->list, &c->idx_gc); in ubifs_gc_start_commit()
953 struct ubifs_gced_idx_leb *idx_gc, *tmp; in ubifs_gc_end_commit() local
959 list_for_each_entry_safe(idx_gc, tmp, &c->idx_gc, list) in ubifs_gc_end_commit()
960 if (idx_gc->unmap) { in ubifs_gc_end_commit()
961 dbg_gc("LEB %d", idx_gc->lnum); in ubifs_gc_end_commit()
962 err = ubifs_leb_unmap(c, idx_gc->lnum); in ubifs_gc_end_commit()
965 err = ubifs_change_one_lp(c, idx_gc->lnum, LPROPS_NC, in ubifs_gc_end_commit()
969 list_del(&idx_gc->list); in ubifs_gc_end_commit()
970 kfree(idx_gc); in ubifs_gc_end_commit()
987 while (!list_empty(&c->idx_gc)) { in ubifs_destroy_idx_gc()
988 struct ubifs_gced_idx_leb *idx_gc; in ubifs_destroy_idx_gc() local
990 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, in ubifs_destroy_idx_gc()
993 list_del(&idx_gc->list); in ubifs_destroy_idx_gc()
994 kfree(idx_gc); in ubifs_destroy_idx_gc()
1006 struct ubifs_gced_idx_leb *idx_gc; in ubifs_get_idx_gc_leb() local
1009 if (list_empty(&c->idx_gc)) in ubifs_get_idx_gc_leb()
1011 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, list); in ubifs_get_idx_gc_leb()
1012 lnum = idx_gc->lnum; in ubifs_get_idx_gc_leb()
1014 list_del(&idx_gc->list); in ubifs_get_idx_gc_leb()
1015 kfree(idx_gc); in ubifs_get_idx_gc_leb()