Table of 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)


Table of Contents


www.fiveanddime.net


Google
Web www.fiveanddime.net