Lines Matching refs:iter

234 	struct ucounts *ucounts, *iter, *bad;  in inc_ucount()  local
237 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
239 tns = iter->ns; in inc_ucount()
241 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
246 bad = iter; in inc_ucount()
247 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
248 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
256 struct ucounts *iter; in dec_ucount() local
257 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
258 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
266 struct ucounts *iter; in inc_rlimit_ucounts() local
270 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_ucounts()
271 long new = atomic_long_add_return(v, &iter->ucount[type]); in inc_rlimit_ucounts()
274 else if (iter == ucounts) in inc_rlimit_ucounts()
276 max = READ_ONCE(iter->ns->ucount_max[type]); in inc_rlimit_ucounts()
283 struct ucounts *iter; in dec_rlimit_ucounts() local
285 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_rlimit_ucounts()
286 long dec = atomic_long_sub_return(v, &iter->ucount[type]); in dec_rlimit_ucounts()
288 if (iter == ucounts) in dec_rlimit_ucounts()
297 struct ucounts *iter, *next; in do_dec_rlimit_put_ucounts() local
298 for (iter = ucounts; iter != last; iter = next) { in do_dec_rlimit_put_ucounts()
299 long dec = atomic_long_sub_return(1, &iter->ucount[type]); in do_dec_rlimit_put_ucounts()
301 next = iter->ns->ucounts; in do_dec_rlimit_put_ucounts()
303 put_ucounts(iter); in do_dec_rlimit_put_ucounts()
315 struct ucounts *iter; in inc_rlimit_get_ucounts() local
319 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_get_ucounts()
320 long new = atomic_long_add_return(1, &iter->ucount[type]); in inc_rlimit_get_ucounts()
323 if (iter == ucounts) in inc_rlimit_get_ucounts()
325 max = READ_ONCE(iter->ns->ucount_max[type]); in inc_rlimit_get_ucounts()
332 if (!get_ucounts(iter)) in inc_rlimit_get_ucounts()
337 dec = atomic_long_sub_return(1, &iter->ucount[type]); in inc_rlimit_get_ucounts()
340 do_dec_rlimit_put_ucounts(ucounts, iter, type); in inc_rlimit_get_ucounts()
346 struct ucounts *iter; in is_ucounts_overlimit() local
350 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in is_ucounts_overlimit()
351 if (get_ucounts_value(iter, type) > max) in is_ucounts_overlimit()
353 max = READ_ONCE(iter->ns->ucount_max[type]); in is_ucounts_overlimit()