[PATCH] fdtable: Remove the free_files field
Vadim Lobanov authored

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: default avatarVadim 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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
4fd45812
Name Last commit Last update
..
9p [PATCH] 9p: change uses of f_{dentry,vfsmnt} to use f_path
adfs [PATCH] struct path: convert adfs
affs [PATCH] affs: change uses of f_{dentry, vfsmnt} to use f_path
afs [PATCH] rename struct namespace to struct mnt_namespace
autofs [PATCH] autofs: change uses of f_{dentry, vfsmnt} to use f_path
autofs4 [PATCH] autofs4: change uses of f_{dentry, vfsmnt} to use f_path
befs [PATCH] struct path: convert befs
bfs [PATCH] struct path: convert bfs
cifs [PATCH] io-accounting-read-accounting cifs fix
coda [PATCH] struct path: convert coda
configfs [PATCH] configfs: change uses of f_{dentry, vfsmnt} to use f_path
cramfs [PATCH] struct path: convert cramfs
debugfs [PATCH] debugfs: add header file
devpts [PATCH] inode-diet: Eliminate i_blksize from the inode structure
dlm Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
ecryptfs [PATCH] ecryptfs: change uses of f_{dentry, vfsmnt} to use f_path
efs [PATCH] struct path: convert efs
exportfs [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers
ext2 [PATCH] LOG2: Implement a general integer log2 facility in the kernel
ext3 [PATCH] LOG2: Implement a general integer log2 facility in the kernel
ext4 [PATCH] ext4: change uses of f_{dentry, vfsmnt} to use f_path
fat [PATCH] fat: change uses of f_{dentry,vfsmnt} to use f_path
freevxfs [PATCH] struct path: convert freevxfs
fuse [PATCH] struct path: convert fuse
gfs2 [PATCH] struct path: convert gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfs_common
nfsd
nls
ntfs
ocfs2
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
romfs
smbfs
sysfs
sysv
udf
ufs
vfat
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify.c
inotify_user.c
internal.h
ioctl.c
ioprio.c
libfs.c
locks.c
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
splice.c
stack.c
stat.c
super.c
sync.c
utimes.c
xattr.c
xattr_acl.c