Lines Matching refs:rlist
2658 void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist, in gfs2_rlist_add() argument
2667 if (gfs2_assert_warn(sdp, !rlist->rl_ghs)) in gfs2_rlist_add()
2674 if (rlist->rl_rgrps) { in gfs2_rlist_add()
2675 rgd = rlist->rl_rgd[rlist->rl_rgrps - 1]; in gfs2_rlist_add()
2691 for (x = 0; x < rlist->rl_rgrps; x++) { in gfs2_rlist_add()
2692 if (rlist->rl_rgd[x] == rgd) { in gfs2_rlist_add()
2693 swap(rlist->rl_rgd[x], in gfs2_rlist_add()
2694 rlist->rl_rgd[rlist->rl_rgrps - 1]); in gfs2_rlist_add()
2699 if (rlist->rl_rgrps == rlist->rl_space) { in gfs2_rlist_add()
2700 new_space = rlist->rl_space + 10; in gfs2_rlist_add()
2705 if (rlist->rl_rgd) { in gfs2_rlist_add()
2706 memcpy(tmp, rlist->rl_rgd, in gfs2_rlist_add()
2707 rlist->rl_space * sizeof(struct gfs2_rgrpd *)); in gfs2_rlist_add()
2708 kfree(rlist->rl_rgd); in gfs2_rlist_add()
2711 rlist->rl_space = new_space; in gfs2_rlist_add()
2712 rlist->rl_rgd = tmp; in gfs2_rlist_add()
2715 rlist->rl_rgd[rlist->rl_rgrps++] = rgd; in gfs2_rlist_add()
2729 void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, in gfs2_rlist_alloc() argument
2734 rlist->rl_ghs = kmalloc_array(rlist->rl_rgrps, in gfs2_rlist_alloc()
2737 for (x = 0; x < rlist->rl_rgrps; x++) in gfs2_rlist_alloc()
2738 gfs2_holder_init(rlist->rl_rgd[x]->rd_gl, state, flags, in gfs2_rlist_alloc()
2739 &rlist->rl_ghs[x]); in gfs2_rlist_alloc()
2748 void gfs2_rlist_free(struct gfs2_rgrp_list *rlist) in gfs2_rlist_free() argument
2752 kfree(rlist->rl_rgd); in gfs2_rlist_free()
2754 if (rlist->rl_ghs) { in gfs2_rlist_free()
2755 for (x = 0; x < rlist->rl_rgrps; x++) in gfs2_rlist_free()
2756 gfs2_holder_uninit(&rlist->rl_ghs[x]); in gfs2_rlist_free()
2757 kfree(rlist->rl_ghs); in gfs2_rlist_free()
2758 rlist->rl_ghs = NULL; in gfs2_rlist_free()