函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ioctl_file_dedupe_range

函数原型:static int ioctl_file_dedupe_range(struct file *file, struct file_dedupe_range __user *argp)

返回类型:int

参数:

类型参数名称
struct file *file
struct file_dedupe_range __user *argp
626  struct file_dedupe_range * same = NULL
631  如果Careful: we have to cast the result to the type of the pointer* for sign reasons(count, & - total elements in info array )则
632  ret等于负EFAULT
633  转到:out
636  size等于offsetof(structfile_dedupe_range__user, info[count])
637  如果size大于PAGE_SIZE
638  ret等于负ENOMEM
639  转到:out
642  same等于memdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result is physically* contiguous, to be freed by kfree().
643  如果是错误
644  ret等于错误
645  same = NULL
646  转到:out
649  - total elements in info array 等于count
650  ret等于vfs_dedupe_file_range(file, same)
651  如果ret则转到:out
654  ret等于copy_to_user(argp, same, size)
655  如果retret等于负EFAULT
658  out :
659  释放内存
660  返回:ret
调用者
名称描述
do_vfs_ioctlWhen you add any new common ioctls to the switches above and below* please update compat_sys_ioctl() too.* do_vfs_ioctl() is not for drivers and not intended to be EXPORT_SYMBOL()'d.* It's just a simple helper for sys_ioctl and compat_sys_ioctl.