Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fanotify\fanotify_user.c Create Date:2022-07-28 20:18:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:create_fd

Proto:static int create_fd(struct fsnotify_group *group, struct fanotify_event *event, struct file **file)

Type:int

Parameter:

TypeParameterName
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  If client_fd < 0 Then Return client_fd
118  If dentry && mnt Then new_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  Else new_file = ERR_PTR( - EOVERFLOW)
124  If IS_ERR(new_file) Then
132  put_unused_fd(client_fd)
133  client_fd = PTR_ERR(new_file)
134  Else
135  file = new_file
138  Return client_fd
Caller
NameDescribe
copy_event_to_user