Lines Matching refs:idx_gc

524 		struct ubifs_gced_idx_leb *idx_gc;  in ubifs_garbage_collect_leb()  local
540 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_garbage_collect_leb()
541 if (!idx_gc) { in ubifs_garbage_collect_leb()
546 idx_gc->lnum = lnum; in ubifs_garbage_collect_leb()
547 idx_gc->unmap = 0; in ubifs_garbage_collect_leb()
548 list_add(&idx_gc->list, &c->idx_gc); in ubifs_garbage_collect_leb()
681 if (i > SOFT_LEBS_LIMIT && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
801 if (ret == -ENOSPC && !list_empty(&c->idx_gc)) { in ubifs_garbage_collect()
841 struct ubifs_gced_idx_leb *idx_gc; in ubifs_gc_start_commit() local
874 list_for_each_entry(idx_gc, &c->idx_gc, list) in ubifs_gc_start_commit()
875 idx_gc->unmap = 1; in ubifs_gc_start_commit()
886 idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS); in ubifs_gc_start_commit()
887 if (!idx_gc) { in ubifs_gc_start_commit()
898 kfree(idx_gc); in ubifs_gc_start_commit()
903 idx_gc->lnum = lp->lnum; in ubifs_gc_start_commit()
904 idx_gc->unmap = 1; in ubifs_gc_start_commit()
905 list_add(&idx_gc->list, &c->idx_gc); in ubifs_gc_start_commit()
920 struct ubifs_gced_idx_leb *idx_gc, *tmp; in ubifs_gc_end_commit() local
926 list_for_each_entry_safe(idx_gc, tmp, &c->idx_gc, list) in ubifs_gc_end_commit()
927 if (idx_gc->unmap) { in ubifs_gc_end_commit()
928 dbg_gc("LEB %d", idx_gc->lnum); in ubifs_gc_end_commit()
929 err = ubifs_leb_unmap(c, idx_gc->lnum); in ubifs_gc_end_commit()
932 err = ubifs_change_one_lp(c, idx_gc->lnum, LPROPS_NC, in ubifs_gc_end_commit()
936 list_del(&idx_gc->list); in ubifs_gc_end_commit()
937 kfree(idx_gc); in ubifs_gc_end_commit()
954 while (!list_empty(&c->idx_gc)) { in ubifs_destroy_idx_gc()
955 struct ubifs_gced_idx_leb *idx_gc; in ubifs_destroy_idx_gc() local
957 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, in ubifs_destroy_idx_gc()
960 list_del(&idx_gc->list); in ubifs_destroy_idx_gc()
961 kfree(idx_gc); in ubifs_destroy_idx_gc()
973 struct ubifs_gced_idx_leb *idx_gc; in ubifs_get_idx_gc_leb() local
976 if (list_empty(&c->idx_gc)) in ubifs_get_idx_gc_leb()
978 idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, list); in ubifs_get_idx_gc_leb()
979 lnum = idx_gc->lnum; in ubifs_get_idx_gc_leb()
981 list_del(&idx_gc->list); in ubifs_get_idx_gc_leb()
982 kfree(idx_gc); in ubifs_get_idx_gc_leb()