函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcookies.c Create Date:2022-07-29 11:11:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This is the main kernel-side routine that retrieves the cookie* value for a dentry/vfsmnt pair.

函数原型:int get_dcookie(const struct path *path, unsigned long *cookie)

返回类型:int

参数:

类型参数名称
const struct path *path
unsigned long *cookie
119  err等于0
122  mutex_lock( & dcookie_mutex)
124  如果非is_live()则
125  err等于负EINVAL
126  转到:out
129  如果 protected by d_lock 按位与For use by dcookie subsystem
130  dcs等于find_dcookie((unsignedlong)dentry)
131  否则
132  dcs等于alloc_dcookie(path)
133  如果非dcs
134  err等于负ENOMEM
135  转到:out
139  cookie等于The dentry is locked, its address will do for the cookie
141  out :
142  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
143  返回:err