| 函数逻辑报告 | 
| Source Code: fs\notify\fanotify\fanotify_user.c | Create Date:2022-07-29 10:50:24 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:do_fanotify_mark
函数原型:static int do_fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask, int dfd, const char __user *pathname)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| int | fanotify_fd | |
| unsigned int | flags | |
| __u64 | mask | |
| int | dfd | |
| const char __user * | pathname | 
| 955 | __kernel_fsid_t __fsid, * fsid = NULL | 
| 956 | valid_mask等于Events that user can request to be notified on 按位或Extra flags that may be reported with event or control handling of events | 
| 961 | pr_debug("%s: fanotify_fd=%d flags=%x dfd=%d pathname=%p mask=%llx\n", __func__, fanotify_fd, flags, dfd, pathname, mask) | 
| 968 | 如果flags按位与FANOTIFY_MARK_FLAGS的反则返回:负EINVAL | 
| 974 | 退出 | 
| 975 | 当:mark_type恒等于FAN_MARK_MOUNT | 
| 977 | 退出 | 
| 978 | 当:mark_type恒等于FAN_MARK_FILESYSTEM | 
| 980 | 退出 | 
| 981 | 默认 | 
| 982 | 返回:负EINVAL | 
| 986 | 当: & == lags used for fanotify_modify_mark() | 
| 987 | 当: & == FAN_MARK_REMOVE | 
| 991 | 当: & == FAN_MARK_FLUSH | 
| 992 | 如果flags按位与FANOTIFY_MARK_TYPE_BITS按位或FAN_MARK_FLUSH的值的反则返回:负EINVAL | 
| 994 | 退出 | 
| 995 | 默认 | 
| 996 | 返回:负EINVAL | 
| 999 | 如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_FANOTIFY_ACCESS_PERMISSIONS)则valid_mask或等于Events that require a permission response from user | 
| 1002 | 如果mask按位与valid_mask的反则返回:负EINVAL | 
| 1005 | f等于fdget(fanotify_fd) | 
| 1006 | 如果此条件成立可能性小(为编译器优化)(!file)则返回:负EBADF | 
| 1011 | 如果此条件成立可能性小(为编译器优化)(f_op != & fanotify_fops)则转到:fput_and_out | 
| 1020 | 如果mask按位与Events that require a permission response from user 且priority恒等于rmal notifiers, no permissions 则转到:fput_and_out | 
| 1031 | 如果mask按位与Events that can only be reported with data type FSNOTIFY_EVENT_INODE 且非FAN_GROUP_FLAG(group, Report unique file id )或mark_type恒等于FAN_MARK_MOUNT的值则转到:fput_and_out | 
| 1036 | 如果flags按位与FAN_MARK_FLUSH则 | 
| 1037 | ret等于0 | 
| 1044 | 转到:fput_and_out | 
| 1047 | ret等于fanotify_find_path(dfd, pathname, & path, flags, (mask & Events that can be reported to backends ), obj_type) | 
| 1049 | 如果ret则转到:fput_and_out | 
| 1052 | 如果flags按位与lags used for fanotify_modify_mark() 则 | 
| 1053 | ret等于fanotify_events_supported( & path, mask) | 
| 1054 | 如果ret则转到:path_put_and_out | 
| 1058 | 如果FAN_GROUP_FLAG(group, Report unique file id )则 | 
| 1060 | 如果ret则转到:path_put_and_out | 
| 1067 | 如果mark_type恒等于These are NOT bitwise flags. Both bits can be used togther. 则inode等于 Where the name belongs to - NULL is * negative | 
| 1074 | 当: & == lags used for fanotify_modify_mark() | 
| 1075 | 如果mark_type恒等于FAN_MARK_MOUNT则ret等于fanotify_add_vfsmount_mark(group, mnt, mask, flags, fsid) | 
| 1078 | 否则如果mark_type恒等于FAN_MARK_FILESYSTEM则ret等于fanotify_add_sb_mark(group, pointer to superblock , mask, flags, fsid) | 
| 1084 | 退出 | 
| 1085 | 当: & == FAN_MARK_REMOVE | 
| 1086 | 如果mark_type恒等于FAN_MARK_MOUNT则ret等于fanotify_remove_vfsmount_mark(group, mnt, mask, flags) | 
| 1089 | 否则如果mark_type恒等于FAN_MARK_FILESYSTEM则ret等于fanotify_remove_sb_mark(group, pointer to superblock , mask, flags) | 
| 1095 | 退出 | 
| 1096 | 默认 | 
| 1100 | path_put_and_out : | 
| 1102 | fput_and_out : | 
| 1104 | 返回:ret | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |