函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Copy all file descriptors from the old table to the new, expanded table and* clear the extra space. Called with the files spinlock held for write.

函数原型:static void copy_fdtable(struct fdtable *nfdt, struct fdtable *ofdt)

返回类型:void

参数:

类型参数名称
struct fdtable *nfdt
struct fdtable *ofdt
75  BUG_ON(max_fds < max_fds)
77  cpy等于max_fds乘*的长度
78  set等于max_fdsmax_fds的差乘*的长度
79  memcpy( current fd array , current fd array , cpy)
80  memset((char * ) current fd array + cpy, 0, set)
82  Copy 'count' fd bits from the old table to the new table and clear the extra* space if any. This does not copy the file pointers. Called with the files* spinlock held for write.
调用者
名称描述
expand_fdtableExpand the file descriptor table.* This function will allocate a new fdtable and both fd array and fdset, of* the given size.* Return <0 error code on error; 1 on successful completion.