函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:variant of __close_fd that gets a ref on the file for later fput

函数原型:int __close_fd_get_file(unsigned int fd, struct file **res)

返回类型:int

参数:

类型参数名称
unsigned intfd
struct file **res
649  files等于files
653  加自旋锁
654  fdt等于files_fdtable(files)
655  如果fd大于等于max_fds则转到:out_unlock
657  file等于 current fd array [fd]
658  如果非file则转到:out_unlock
660  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( current fd array [fd], NULL)
661  __put_unused_fd(files, fd)
662  自旋锁解锁
663  get_file(file)
664  res等于file
665  返回:"id" is the POSIX thread ID. We use the* files pointer for this..
667  out_unlock :
668  自旋锁解锁
669  * res = NULL
670  返回:负ENOENT