函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_sys_name_to_handle

函数原型:static long do_sys_name_to_handle(struct path *path, struct file_handle __user *ufh, int __user *mnt_id)

返回类型:long

参数:

类型参数名称
struct path *path
struct file_handle __user *ufh
int __user *mnt_id
24  struct file_handle * handle = NULL
30  如果非s_export_op或非fh_to_dentry则返回:负EOPNOTSUPP
34  如果copy_from_user( & f_handle, ufh, sizeof(structfile_handle))则返回:负EFAULT
37  如果handle_bytes大于limit the handle size to NFSv4 handle size now 则返回:负EINVAL
40  handle等于开辟内存
42  如果非handle则返回:负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_dwordssizeof(u32)
55  handle_bytes等于handle_bytes
56  如果handle_bytes大于handle_bytesretval恒等于FILEID_INVALIDretval恒等于负ENOSPC
67  handle_bytes等于0
68  retval等于负EOVERFLOW
69  否则retval等于0
72  如果put_user - Write a simple value into user space( mount identifier , mnt_id)或copy_to_user(ufh, handle, sizeof(structfile_handle) + handle_bytes)则retval等于负EFAULT
76  释放内存
77  返回:retval
调用者
名称描述
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