Lines Matching refs:iter

233 	struct ucounts *ucounts, *iter, *bad;  in inc_ucount()  local
236 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
238 tns = iter->ns; in inc_ucount()
240 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
245 bad = iter; in inc_ucount()
246 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
247 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
255 struct ucounts *iter; in dec_ucount() local
256 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
257 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
265 struct ucounts *iter; in inc_rlimit_ucounts() local
269 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_ucounts()
270 long new = atomic_long_add_return(v, &iter->rlimit[type]); in inc_rlimit_ucounts()
273 else if (iter == ucounts) in inc_rlimit_ucounts()
275 max = get_userns_rlimit_max(iter->ns, type); in inc_rlimit_ucounts()
282 struct ucounts *iter; in dec_rlimit_ucounts() local
284 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_rlimit_ucounts()
285 long dec = atomic_long_sub_return(v, &iter->rlimit[type]); in dec_rlimit_ucounts()
287 if (iter == ucounts) in dec_rlimit_ucounts()
296 struct ucounts *iter, *next; in do_dec_rlimit_put_ucounts() local
297 for (iter = ucounts; iter != last; iter = next) { in do_dec_rlimit_put_ucounts()
298 long dec = atomic_long_sub_return(1, &iter->rlimit[type]); in do_dec_rlimit_put_ucounts()
300 next = iter->ns->ucounts; in do_dec_rlimit_put_ucounts()
302 put_ucounts(iter); in do_dec_rlimit_put_ucounts()
314 struct ucounts *iter; in inc_rlimit_get_ucounts() local
318 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_get_ucounts()
319 long new = atomic_long_add_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
322 if (iter == ucounts) in inc_rlimit_get_ucounts()
324 max = get_userns_rlimit_max(iter->ns, type); in inc_rlimit_get_ucounts()
331 if (!get_ucounts(iter)) in inc_rlimit_get_ucounts()
336 dec = atomic_long_sub_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
339 do_dec_rlimit_put_ucounts(ucounts, iter, type); in inc_rlimit_get_ucounts()
345 struct ucounts *iter; in is_rlimit_overlimit() local
349 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in is_rlimit_overlimit()
350 long val = get_rlimit_value(iter, type); in is_rlimit_overlimit()
353 max = get_userns_rlimit_max(iter->ns, type); in is_rlimit_overlimit()