Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_handle_open

Proto:static long do_handle_open(int mountdirfd, struct file_handle __user *ufh, int open_flag)

Type:long

Parameter:

TypeParameterName
intmountdirfd
struct file_handle __user *ufh
intopen_flag
218  retval = 0
223  retval = handle_to_path(mountdirfd, ufh, & path)
224  If retval Then Return retval
227  fd = get_unused_fd_flags(open_flag)
228  If fd < 0 Then
229  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.
230  Return fd
232  file = file_open_root(dentry, mnt, "", open_flag, 0)
233  If IS_ERR(file) Then
234  put_unused_fd(fd)
235  retval = PTR_ERR(file)
236  Else
237  retval = fd
238  snotify_open - file was opened
239  fd_install(fd, file)
241  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.
242  Return retval
Caller
NameDescribe
SYSCALL_DEFINE3sys_open_by_handle_at: Open the file handle*@mountdirfd: directory file descriptor*@handle: file handle to be opened*@flags: open flags.*@mountdirfd indicate the directory file descriptor* of the mount point. file handle is decoded relative
COMPAT_SYSCALL_DEFINE3Exactly like fs/open.c:sys_open_by_handle_at(), except that it* doesn't set the O_LARGEFILE flag.