Lines Matching refs:dict
21 #include "dict.h"
45 static int write_dquots(dict_t *dict, struct quota_handle *qh)
51 for (n = dict_first(dict); n; n = dict_next(dict, n)) {
73 dict_t *dict;
84 dict = qctx->quota_dict[qtype];
85 if (dict) {
90 retval = write_dquots(dict, h);
151 dict_t *dict;
167 err = quota_get_mem(sizeof(dict_t), &dict);
173 ctx->quota_dict[qtype] = dict;
174 dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp);
175 dict_set_allocator(dict, NULL, quota_dnode_free, NULL);
184 dict_t *dict;
193 dict = ctx->quota_dict[qtype];
195 if (dict) {
196 dict_free_nodes(dict);
197 free(dict);
205 static struct dquot *get_dq(dict_t *dict, __u32 key)
210 n = dict_lookup(dict, UINT_TO_VOIDPTR(key));
219 dict_alloc_insert(dict, UINT_TO_VOIDPTR(key), dq);
231 dict_t *dict;
238 dict = qctx->quota_dict[qtype];
239 if (dict) {
240 dq = get_dq(dict, get_qid(inode, qtype));
253 dict_t *dict;
260 dict = qctx->quota_dict[qtype];
261 if (dict) {
262 dq = get_dq(dict, get_qid(inode, qtype));
274 dict_t *dict; enum quota_type qtype;
280 dict = qctx->quota_dict[qtype];
281 if (dict) {
282 dq = get_dq(dict, get_qid(inode, qtype));
372 dict_t *dict = qctx->quota_dict[qtype];
375 if (!dict)
395 for (n = dict_first(dict); n; n = dict_next(dict, n)) {