Lines Matching full:file
4 File management in the Linux kernel
7 This document describes how locking for files (struct file)
8 and file descriptor table (struct files) works.
10 Up until 2.6.12, the file descriptor table has been protected
12 ->file_lock protected accesses to all the file related fields
13 of the table. ->count was used for sharing the file descriptor
17 a put_files_struct() frees the file descriptor (fd) table.
18 The files (struct file) themselves are protected using
21 In the new lock-free model of file descriptor management,
23 based on RCU. The file descriptor table contains multiple
25 array of file pointers, the sizes of the sets and the array
27 a lock-free reader, all the elements of the file descriptor
64 4. To look up the file structure given an fd, a reader
70 struct file *file;
73 file = lookup_fdget_rcu(fd);
75 if (file) {
77 fput(file);
81 5. Since both fdtable and file structures can be looked up
96 fd = locate_fd(files, file, start);
108 On newer kernels rcu based file lookup has been switched to rely on
110 to just acquire a reference to the file in question under rcu using
111 atomic_long_inc_not_zero() since the file might have already been
118 In addition, it isn't possible to access or check fields in struct file
121 in struct file. With SLAB_TYPESAFE_BY_RCU it is necessary that callers