函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ucount.c Create Date:2022-07-27 10:34:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_ucounts

函数原型:static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)

返回类型:struct ucounts

参数:

类型参数名称
struct user_namespace *ns
kuid_tuid
127  hashent等于ucounts_hashentry(ns, uid)
130  spin_lock_irq( & ucounts_lock)
131  ucounts等于find_ucounts(ns, uid, hashent)
132  如果非ucounts
133  spin_unlock_irq( & ucounts_lock)
135  new等于分配内存并置零
136  如果非new则返回:NULL
139  ns等于ns
140  uid等于uid
141  count等于0
143  spin_lock_irq( & ucounts_lock)
144  ucounts等于find_ucounts(ns, uid, hashent)
145  如果ucounts
146  释放内存
147  否则
149  ucounts等于new
152  如果count恒等于INT_MAXucounts = NULL
154  否则count加等于1
156  spin_unlock_irq( & ucounts_lock)
157  返回:ucounts
调用者
名称描述
inc_ucount