mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
[PATCH] fdtable: Remove the free_files field
An fdtable can either be embedded inside a files_struct or standalone (after being expanded). When an fdtable is being discarded after all RCU references to it have expired, we must either free it directly, in the standalone case, or free the files_struct it is contained within, in the embedded case. Currently the free_files field controls this behavior, but we can get rid of it entirely, as all the necessary information is already recorded. We can distinguish embedded and standalone fdtables using max_fds, and if it is embedded we can divine the relevant files_struct using container_of(). Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Dipankar Sarma <dipankar@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
bbea9f6966
commit
4fd45812cb
5 changed files with 11 additions and 27 deletions
|
@ -16,7 +16,6 @@
|
|||
.close_on_exec = (fd_set *)&init_files.close_on_exec_init, \
|
||||
.open_fds = (fd_set *)&init_files.open_fds_init, \
|
||||
.rcu = RCU_HEAD_INIT, \
|
||||
.free_files = NULL, \
|
||||
.next = NULL, \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue