Lines Matching refs:iter
232 struct ucounts *ucounts, *iter, *bad; in inc_ucount() local
235 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
237 tns = iter->ns; in inc_ucount()
239 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
244 bad = iter; in inc_ucount()
245 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
246 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
254 struct ucounts *iter; in dec_ucount() local
255 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
256 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
264 struct ucounts *iter; in inc_rlimit_ucounts() local
268 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_ucounts()
269 long new = atomic_long_add_return(v, &iter->rlimit[type]); in inc_rlimit_ucounts()
272 else if (iter == ucounts) in inc_rlimit_ucounts()
274 max = get_userns_rlimit_max(iter->ns, type); in inc_rlimit_ucounts()
281 struct ucounts *iter; in dec_rlimit_ucounts() local
283 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_rlimit_ucounts()
284 long dec = atomic_long_sub_return(v, &iter->rlimit[type]); in dec_rlimit_ucounts()
286 if (iter == ucounts) in dec_rlimit_ucounts()
295 struct ucounts *iter, *next; in do_dec_rlimit_put_ucounts() local
296 for (iter = ucounts; iter != last; iter = next) { in do_dec_rlimit_put_ucounts()
297 long dec = atomic_long_sub_return(1, &iter->rlimit[type]); in do_dec_rlimit_put_ucounts()
299 next = iter->ns->ucounts; in do_dec_rlimit_put_ucounts()
301 put_ucounts(iter); in do_dec_rlimit_put_ucounts()
313 struct ucounts *iter; in inc_rlimit_get_ucounts() local
317 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_get_ucounts()
318 long new = atomic_long_add_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
321 if (iter == ucounts) in inc_rlimit_get_ucounts()
323 max = get_userns_rlimit_max(iter->ns, type); in inc_rlimit_get_ucounts()
330 if (!get_ucounts(iter)) in inc_rlimit_get_ucounts()
335 dec = atomic_long_sub_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
338 do_dec_rlimit_put_ucounts(ucounts, iter, type); in inc_rlimit_get_ucounts()
344 struct ucounts *iter; in is_rlimit_overlimit() local
348 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in is_rlimit_overlimit()
349 long val = get_rlimit_value(iter, type); in is_rlimit_overlimit()
352 max = get_userns_rlimit_max(iter->ns, type); in is_rlimit_overlimit()