Lines Matching refs:iter

228 	struct ucounts *ucounts, *iter, *bad;  in inc_ucount()  local
231 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
233 tns = iter->ns; in inc_ucount()
235 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
240 bad = iter; in inc_ucount()
241 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
242 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
250 struct ucounts *iter; in dec_ucount() local
251 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
252 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
260 struct ucounts *iter; in inc_rlimit_ucounts() local
263 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_ucounts()
264 long max = READ_ONCE(iter->ns->ucount_max[type]); in inc_rlimit_ucounts()
265 long new = atomic_long_add_return(v, &iter->ucount[type]); in inc_rlimit_ucounts()
268 else if (iter == ucounts) in inc_rlimit_ucounts()
276 struct ucounts *iter; in dec_rlimit_ucounts() local
278 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_rlimit_ucounts()
279 long dec = atomic_long_add_return(-v, &iter->ucount[type]); in dec_rlimit_ucounts()
281 if (iter == ucounts) in dec_rlimit_ucounts()
290 struct ucounts *iter, *next; in do_dec_rlimit_put_ucounts() local
291 for (iter = ucounts; iter != last; iter = next) { in do_dec_rlimit_put_ucounts()
292 long dec = atomic_long_add_return(-1, &iter->ucount[type]); in do_dec_rlimit_put_ucounts()
294 next = iter->ns->ucounts; in do_dec_rlimit_put_ucounts()
296 put_ucounts(iter); in do_dec_rlimit_put_ucounts()
308 struct ucounts *iter; in inc_rlimit_get_ucounts() local
311 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_get_ucounts()
312 long max = READ_ONCE(iter->ns->ucount_max[type]); in inc_rlimit_get_ucounts()
313 long new = atomic_long_add_return(1, &iter->ucount[type]); in inc_rlimit_get_ucounts()
316 if (iter == ucounts) in inc_rlimit_get_ucounts()
324 if (!get_ucounts(iter)) in inc_rlimit_get_ucounts()
329 dec = atomic_long_add_return(-1, &iter->ucount[type]); in inc_rlimit_get_ucounts()
332 do_dec_rlimit_put_ucounts(ucounts, iter, type); in inc_rlimit_get_ucounts()
338 struct ucounts *iter; in is_ucounts_overlimit() local
341 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in is_ucounts_overlimit()
342 max = READ_ONCE(iter->ns->ucount_max[type]); in is_ucounts_overlimit()
343 if (get_ucounts_value(iter, type) > max) in is_ucounts_overlimit()