Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ioctl_file_dedupe_range

Proto:static int ioctl_file_dedupe_range(struct file *file, struct file_dedupe_range __user *argp)

Type:int

Parameter:

TypeParameterName
struct file *file
struct file_dedupe_range __user *argp
626  struct file_dedupe_range * same = NULL
631  If Get a simple variable from user space(count, & - total elements in info array ) Then
632  ret = -EFAULT
633  Go to out
636  size = offsetof(structfile_dedupe_range__user, info[count])
637  If size > PAGE_SIZE Then
638  ret = -ENOMEM
639  Go to 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  If IS_ERR(same) Then
644  ret = PTR_ERR(same)
645  same = NULL
646  Go to out
649  - total elements in info array = count
650  ret = vfs_dedupe_file_range(file, same)
651  If ret Then Go to out
654  ret = copy_to_user(argp, same, size)
655  If ret Then ret = -EFAULT
658  out :
659  kfree(same)
660  Return ret
Caller
NameDescribe
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.