Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ucount.c Create Date:2022-07-28 09:34:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:inc_ucount

Proto:struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type)

Type:struct ucounts

Parameter:

TypeParameterName
struct user_namespace *ns
kuid_tuid
enum ucount_typetype
194  ucounts = get_ucounts(ns, uid)
195  When iter cycle
197  tns = ns
198  max = READ_ONCE(ucount_max[type])
199  If Not atomic_inc_below( & ucount[type], max) Then Go to fail
202  Return ucounts
203  fail :
204  bad = iter
205  When iter != bad cycle atomic_dec( & ucount[type])
208  put_ucounts(ucounts)
209  Return NULL
Caller
NameDescribe
inc_cgroup_namespacesgroup namespaces
inc_uts_namespaces
inc_user_namespaces
inc_pid_namespaces
inotify_new_group