linux_dsm_epyc7002/fs/nfs
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
..
callback_proc.c [PATCH] fs/nfs/callback* passes error values big-endian 2006-10-20 10:26:40 -07:00
callback_xdr.c [PATCH] xdr annotations: fs/nfs/callback* 2006-10-20 10:26:40 -07:00
callback.c [PATCH] knfsd: Drop 'serv' option to svc_recv and svc_process 2006-10-02 07:57:18 -07:00
callback.h [PATCH] xdr annotations: fs/nfs/callback* 2006-10-20 10:26:40 -07:00
client.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
delegation.c [PATCH] fs: Removing useless casts 2006-09-27 08:26:10 -07:00
delegation.h NFS: Rename struct nfs4_client to struct nfs_client 2006-09-22 23:24:31 -04:00
dir.c [PATCH] NFS: Cache invalidation fixup 2006-10-21 13:35:06 -07:00
direct.c [PATCH] NFS: Deal with failure of invalidate_inode_pages2() 2006-10-20 10:26:39 -07:00
file.c [PATCH] Vectorize aio_read/aio_write fileop methods 2006-10-01 00:39:28 -07:00
getroot.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
idmap.c SUNRPC: Make rpc_mkpipe() take the parent dentry as an argument 2006-09-22 23:24:54 -04:00
inode.c [PATCH] NFS: __nfs_revalidate_inode() can use "inode" before checking it is non-NULL 2006-10-20 10:26:39 -07:00
internal.h [PATCH] xdr annotations: NFS readdir entries 2006-10-20 10:26:40 -07:00
iostat.h NFSv4: Fix an oops in nfs4_fill_super 2006-03-20 13:44:48 -05:00
Makefile NFS: Share NFS superblocks per-protocol per-server per-FSID 2006-09-22 23:24:37 -04:00
mount_clnt.c [PATCH] xdr annotations: mount_clnt 2006-10-20 10:26:41 -07:00
namespace.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
nfs2xdr.c [PATCH] xdr annotations: NFS readdir entries 2006-10-20 10:26:40 -07:00
nfs3acl.c NFSv3: Client-side nfsacl caching fix 2006-06-09 09:34:11 -04:00
nfs3proc.c [PATCH] nfs: verifier is network-endian 2006-10-20 10:26:40 -07:00
nfs3xdr.c [PATCH] xdr annotations: NFS readdir entries 2006-10-20 10:26:40 -07:00
nfs4_fs.h WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
nfs4namespace.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
nfs4proc.c [PATCH] nfs: verifier is network-endian 2006-10-20 10:26:40 -07:00
nfs4renewd.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
nfs4state.c NFS: Share NFS superblocks per-protocol per-server per-FSID 2006-09-22 23:24:37 -04:00
nfs4xdr.c [PATCH] xdr annotations: NFS readdir entries 2006-10-20 10:26:40 -07:00
nfsroot.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
pagelist.c [PATCH] Really ignore kmem_cache_destroy return value 2006-09-27 08:26:10 -07:00
proc.c [PATCH] fs: Removing useless casts 2006-09-27 08:26:10 -07:00
read.c [PATCH] Really ignore kmem_cache_destroy return value 2006-09-27 08:26:10 -07:00
super.c [PATCH] NFSv4: Fix thinko in fs/nfs/super.c 2006-10-20 10:26:38 -07:00
symlink.c nfs: remove nfs_put_link() 2006-06-25 06:39:35 -04:00
sysctl.c [PATCH] sysctl: implement CTL_UNNUMBERED 2006-11-06 01:46:23 -08:00
unlink.c NFS: kzalloc conversion in fs/nfs 2006-03-20 13:44:10 -05:00
write.c [PATCH] NFS: Fix oops in nfs_cancel_commit_list 2006-10-20 10:26:38 -07:00