函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fanotify_find_path

函数原型:static int fanotify_find_path(int dfd, const char __user *filename, struct path *path, unsigned int flags, __u64 mask, unsigned int obj_type)

返回类型:int

参数:

类型参数名称
intdfd
const char __user *filename
struct path *path
unsigned intflags
__u64mask
unsigned intobj_type
536  pr_debug("%s: dfd=%d filename=%p flags=%x\n", __func__, dfd, filename, flags)
539  如果(filename == NULL)则
540  f等于fdget(dfd)
542  ret等于负EBADF
543  如果非file则转到:out
546  ret等于负ENOTDIR
547  如果flags按位与FAN_MARK_ONLYDIR且非S_ISDIR(i_mode)则
549  fdput(f)
550  转到:out
553  path等于f_path
554  path_get - get a reference to a path*@path: path to get the reference to* Given a path increment the reference count to the dentry and the vfsmount.
555  fdput(f)
556  否则
557  lookup_flags等于0
559  如果非flags按位与FAN_MARK_DONT_FOLLOW的值则lookup_flags或等于llow links at the end
561  如果flags按位与FAN_MARK_ONLYDIRlookup_flags或等于quire a directory
564  ret等于user_path_at(dfd, filename, lookup_flags, path)
565  如果ret则转到:out
570  ret等于de_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode
571  如果ret
572  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
573  转到:out
576  ret等于security_path_notify(path, mask, obj_type)
577  如果retpath_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
580  out :
581  返回:ret
调用者
名称描述
do_fanotify_mark