kernel-ark/fs
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
..
9p
adfs
affs
afs
autofs [PATCH] autofs4: panic after mount fail 2006-11-14 09:09:27 -08:00
autofs4 [PATCH] autofs4: panic after mount fail 2006-11-14 09:09:27 -08:00
befs
bfs
cifs [CIFS] Fix minor problem with previous patch 2006-11-09 21:25:37 +00:00
coda
configfs
cramfs
debugfs debugfs: check return value correctly 2006-11-16 14:30:26 -08:00
devpts
dlm [DLM] fix oops in kref_put when removing a lockspace 2006-11-06 09:28:01 -05:00
ecryptfs [PATCH] eCryptfs: CIFS nlink fixes 2006-11-16 11:43:38 -08:00
efs
exportfs
ext2
ext3
ext4
fat [PATCH] fat: add fat_getattr() 2006-11-16 11:43:38 -08:00
freevxfs
fuse [PATCH] fuse: ->readpages() cleanup 2006-11-03 12:27:57 -08:00
gfs2 [GFS2] Fix OOM error handling 2006-11-06 08:59:42 -05:00
hfs [PATCH] hfs_fill_super returns success even if no root inode 2006-11-16 11:43:38 -08:00
hfsplus
hostfs
hpfs
hppfs
hugetlbfs [PATCH] hugetlb: prepare_hugepage_range check offset too 2006-11-14 09:09:27 -08:00
isofs
jbd
jbd2
jffs
jffs2
jfs JFS: Remove redundant xattr permission checking 2006-11-02 10:50:40 -06:00
lockd [PATCH] sysctl: implement CTL_UNNUMBERED 2006-11-06 01:46:23 -08:00
minix
msdos [PATCH] fat: add fat_getattr() 2006-11-16 11:43:38 -08:00
ncpfs
nfs WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
nfs_common
nfsd [PATCH] nfsd: fix spurious error return from nfsd_create in async case 2006-11-08 18:29:25 -08:00
nls
ntfs
ocfs2
openpromfs
partitions
proc
qnx4
ramfs
reiserfs [PATCH] reiserfs: reset errval after initializing bitmap cache 2006-11-03 12:27:58 -08:00
romfs
smbfs
sysfs
sysv
udf
ufs
vfat [PATCH] fat: add fat_getattr() 2006-11-16 11:43:38 -08:00
xfs [XFS] Stale the correct inode when freeing clusters. 2006-11-21 18:55:33 +11:00
aio.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
block_dev.c [PATCH] find_bd_holder() fix 2006-10-31 08:06:58 -08:00
buffer.c
char_dev.c
compat_ioctl.c
compat.c [PATCH] sys_pselect7 vs compat_sys_pselect7 uaccess error handling 2006-11-03 12:27:55 -08:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file_table.c
file.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c
inotify.c
internal.h
ioctl.c
ioprio.c
Kconfig [PATCH] AFS: Amend the AFS configuration options 2006-11-16 11:43:38 -08:00
Kconfig.binfmt
libfs.c
locks.c
Makefile
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_v1.c
quota_v2.c
quota.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
splice.c [PATCH] splice: fix problem introduced with inode diet 2006-11-04 08:45:39 -08:00
stat.c
super.c
sync.c
utimes.c
xattr_acl.c
xattr.c [PATCH] Fix user.* xattr permission check for sticky dirs 2006-11-03 12:27:59 -08:00