函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:create_fd

函数原型:static int create_fd(struct fsnotify_group *group, struct fanotify_event *event, struct file **file)

返回类型:int

参数:

类型参数名称
struct fsnotify_group *group
struct fanotify_event *event
struct file **file
106  pr_debug("%s: group=%p event=%p\n", __func__, group, event)
108  client_fd等于get_unused_fd_flags(f_flags)
109  如果client_fd小于0则返回:client_fd
118  如果dentrymntnew_file等于dentry_open( & We hold ref to this path so it may be dereferenced at any* point during this object's lifetime, f_flags | File was opened by fanotify and shouldn't generate fanotify events , current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
122  否则new_file等于错误号
124  如果是错误
132  put_unused_fd(client_fd)
133  client_fd等于错误
134  否则
135  file等于new_file
138  返回:client_fd
调用者
名称描述
copy_event_to_user