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:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fanotify_find_path

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

Type:int

Parameter:

TypeParameterName
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  If (filename == NULL) Then
540  f = fdget(dfd)
542  ret = -EBADF
543  If Not file Then Go to out
546  ret = -ENOTDIR
547  If flags & FAN_MARK_ONLYDIR && Not S_ISDIR(i_mode) Then
549  fdput(f)
550  Go to 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  Else
557  lookup_flags = 0
559  If Not (flags & FAN_MARK_DONT_FOLLOW) Then lookup_flags |= llow links at the end
561  If flags & FAN_MARK_ONLYDIR Then lookup_flags |= quire a directory
564  ret = user_path_at(dfd, filename, lookup_flags, path)
565  If ret Then Go to 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  If ret Then
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  Go to out
576  ret = security_path_notify(path, mask, obj_type)
577  If ret Then 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.
580  out :
581  Return ret
Caller
NameDescribe
do_fanotify_mark