Lines Matching refs:type
230 enum ucount_type type) in inc_ucount() argument
238 max = READ_ONCE(tns->ucount_max[type]); in inc_ucount()
239 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
246 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
252 void dec_ucount(struct ucounts *ucounts, enum ucount_type type) in dec_ucount() argument
256 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
262 long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v) in inc_rlimit_ucounts() argument
269 long new = atomic_long_add_return(v, &iter->rlimit[type]); in inc_rlimit_ucounts()
274 max = get_userns_rlimit_max(iter->ns, type); in inc_rlimit_ucounts()
279 bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v) in dec_rlimit_ucounts() argument
284 long dec = atomic_long_sub_return(v, &iter->rlimit[type]); in dec_rlimit_ucounts()
293 struct ucounts *last, enum rlimit_type type) in do_dec_rlimit_put_ucounts() argument
297 long dec = atomic_long_sub_return(1, &iter->rlimit[type]); in do_dec_rlimit_put_ucounts()
305 void dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type) in dec_rlimit_put_ucounts() argument
307 do_dec_rlimit_put_ucounts(ucounts, NULL, type); in dec_rlimit_put_ucounts()
310 long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type) in inc_rlimit_get_ucounts() argument
318 long new = atomic_long_add_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
323 max = get_userns_rlimit_max(iter->ns, type); 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()
342 bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long rlimit) in is_rlimit_overlimit() argument
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()