Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static void copy_fdtable(struct fdtable *nfdt, struct fdtable *ofdt)

Type:void

Parameter:

TypeParameterName
struct fdtable *nfdt
struct fdtable *ofdt
75  BUG_ON(max_fds < max_fds)
77  cpy = max_fds * size of *
78  set = (max_fds - max_fds) * size of *
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.
Caller
NameDescribe
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.