函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-29 10:31:32
Last Modify:2020-03-18 10:18:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:SYSCALL_DEFINE6

函数原型:SYSCALL_DEFINE6(copy_file_range, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags)

返回类型:

参数:

1698  ret等于负EBADF
1700  f_in等于fdget(fd_in)
1701  如果非file则转到:out2
1704  f_out等于fdget(fd_out)
1705  如果非file则转到:out1
1708  ret等于负EFAULT
1709  如果off_in
1710  如果copy_from_user( & pos_in, off_in, sizeof(loff_t))则转到:out
1712  否则
1713  pos_in等于f_pos
1716  如果off_out
1717  如果copy_from_user( & pos_out, off_out, sizeof(loff_t))则转到:out
1719  否则
1720  pos_out等于f_pos
1723  ret等于py_file_range() differs from regular file read and write in that it* specifically allows return partial success. When it does so is up to* the copy_file_range method.
1725  如果ret大于0则
1726  pos_in加等于ret
1727  pos_out加等于ret
1729  如果off_in
1730  如果copy_to_user(off_in, & pos_in, sizeof(loff_t))则ret等于负EFAULT
1732  否则
1733  f_pos等于pos_in
1736  如果off_out
1737  如果copy_to_user(off_out, & pos_out, sizeof(loff_t))则ret等于负EFAULT
1739  否则
1740  f_pos等于pos_out
1744  out :
1745  fdput(f_out)
1746  out1 :
1747  fdput(f_in)
1748  out2 :
1749  返回:ret