Function report |
Source Code:mm\filemap.c |
Create Date:2022-07-28 14:03:10 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Performs necessary checks before doing a file copy* Can adjust amount of bytes to copy via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the copy should be allowed.
Proto:int generic_copy_file_checks(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, size_t *req_count, unsigned int flags)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file_in | |
| loff_t | pos_in | |
| struct file * | file_out | |
| loff_t | pos_out | |
| size_t * | req_count | |
| unsigned int | flags |
| 3080 | inode_in = file_inode(file_in) |
| 3081 | inode_out = file_inode(file_out) |
| 3091 | If IS_IMMUTABLE(inode_out) Then Return -EPERM |
| 3094 | If IS_SWAPFILE(inode_in) || IS_SWAPFILE(inode_out) Then Return -ETXTBSY |
| 3105 | Else count = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(count, size_in - (uint64_t)pos_in) |
| 3108 | ret = Don't operate on ranges the page cache doesn't support, and don't exceed the* LFS limits. If pos is under the limit it becomes a short access. If it* exceeds the limit we return -EFBIG. |
| 3113 | If inode_in == inode_out && pos_out + count > pos_in && pos_out < pos_in + count Then Return -EINVAL |
| 3119 | Return 0 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |