Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_sys_name_to_handle

Proto:static long do_sys_name_to_handle(struct path *path, struct file_handle __user *ufh, int __user *mnt_id)

Type:long

Parameter:

TypeParameterName
struct path *path
struct file_handle __user *ufh
int __user *mnt_id
24  struct file_handle * handle = NULL
30  If Not s_export_op || Not fh_to_dentry Then Return -EOPNOTSUPP
34  If copy_from_user( & f_handle, ufh, sizeof(structfile_handle)) Then Return -EFAULT
37  If handle_bytes > limit the handle size to NFSv4 handle size now Then Return -EINVAL
40  handle = Allocation memory
42  If Not handle Then Return -ENOMEM
46  handle_dwords = handle_bytes >> 2
49  retval = exportfs_encode_fh(dentry, (structfid * ) file identifier , & handle_dwords, 0)
52  handle_type = retval
54  handle_bytes = handle_dwords * sizeof(u32)
55  handle_bytes = handle_bytes
56  If handle_bytes > handle_bytes || retval == FILEID_INVALID || retval == -ENOSPC Then
67  handle_bytes = 0
68  retval = -EOVERFLOW
69  Else retval = 0
72  If Write a simple value into user space( mount identifier , mnt_id) || copy_to_user(ufh, handle, sizeof(structfile_handle) + handle_bytes) Then retval = -EFAULT
76  kfree(handle)
77  Return retval
Caller
NameDescribe
SYSCALL_DEFINE5sys_name_to_handle_at: convert name to handle*@dfd: directory relative to which name is interpreted if not absolute*@name: name that should be converted to handle