Table of Contentsget_empty_filp - fetches an unreferenced entry from the file table linux/fs/file_table.c
struct file *get_empty_filp(void);
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. 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. - NULL
- No entries were found and the file table is full.
Returns a pointer to the entry in the file table.
Linus Torvalds grow_files(9)
Table of Contents
www.fiveanddime.net