Lines Matching full:file
1 File management in the Linux kernel
4 This document describes how locking for files (struct file)
5 and file descriptor table (struct files) works.
7 Up until 2.6.12, the file descriptor table has been protected
9 ->file_lock protected accesses to all the file related fields
10 of the table. ->count was used for sharing the file descriptor
14 a put_files_struct() frees the file descriptor (fd) table.
15 The files (struct file) themselves are protected using
18 In the new lock-free model of file descriptor management,
20 based on RCU. The file descriptor table contains multiple
22 array of file pointers, the sizes of the sets and the array
24 a lock-free reader, all the elements of the file descriptor
61 4. To look up the file structure given an fd, a reader
66 struct file *file;
69 file = fcheck(fd);
70 if (file) {
76 5. Handling of the file structures is special. Since the look-up
79 file structure. This is avoided using atomic_long_inc_not_zero()
83 file = fcheck_files(files, fd);
84 if (file) {
85 if (atomic_long_inc_not_zero(&file->f_count))
89 file = NULL;
93 return file;
99 6. Since both fdtable and file structures can be looked up
112 fd = locate_fd(files, file, start);