GET_EMPTY_FILP

Section: Kernel Reference Guide (9)
Updated: July 12, 1993
Index Return to Main Contents
 

NAME

get_empty_filp - fetches an unreferenced entry from the file table  

SYNOPSIS

linux/fs/file_table.c

struct file *get_empty_filp(void);
 

DESCRIPTION

This routine will seek out an entry that is not being referenced by any processes. If none are found then it will add new entries to the file table, minimum of NR_FILE entries.  

NOTES

Due to grow_files(), a whole page of entries is created at one time. This may make more than NR_FILE entries. Also when an unreferenced entry is found, it is moved to the ``end'' of the file table. This heuristic is used to hopefully speed up finding unreferenced entries.  

RETURN VALUE

NULL
No entries were found and the file table is full.

Returns a pointer to the entry in the file table.  

AUTHOR

Linus Torvalds  

SEE ALSO

grow_files(9)


 

Index

NAME
SYNOPSIS
DESCRIPTION
NOTES
RETURN VALUE
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:22:45 GMT, March 22, 2025