Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | fd |
Macros | |
#define | get_unused_fd() get_unused_fd_flags(0) |
Functions | |
void | fput (struct file *) |
struct file * | alloc_file (struct path *, fmode_t mode, const struct file_operations *fop) |
struct file * | fget (unsigned int fd) |
struct file * | fget_light (unsigned int fd, int *fput_needed) |
struct file * | fget_raw (unsigned int fd) |
struct file * | fget_raw_light (unsigned int fd, int *fput_needed) |
int | f_dupfd (unsigned int from, struct file *file, unsigned flags) |
int | replace_fd (unsigned fd, struct file *file, unsigned flags) |
void | set_close_on_exec (unsigned int fd, int flag) |
bool | get_close_on_exec (unsigned int fd) |
void | put_filp (struct file *) |
int | get_unused_fd_flags (unsigned flags) |
void | put_unused_fd (unsigned int fd) |
void | fd_install (unsigned int fd, struct file *file) |
void | flush_delayed_fput (void) |
void | __fput_sync (struct file *) |
#define get_unused_fd | ( | ) | get_unused_fd_flags(0) |
Definition at line 330 of file file_table.c.
|
read |
alloc_file - allocate and initialize a 'struct file' : the vfsmount on which the file will reside : the dentry representing the new file : the mode with which the new file will be opened : the 'struct file_operations' for the new file
Use this instead of get_empty_filp() to get a new 'struct file'. Do so because of the same initialization pitfalls reasons listed for init_file(). This is a preferred interface to using init_file().
If all the callers of init_file() are eliminated, its code should be moved into this function.
Definition at line 170 of file file_table.c.
Definition at line 297 of file file_table.c.
Definition at line 304 of file file_table.c.
Definition at line 342 of file file_table.c.