summaryrefslogtreecommitdiff
path: root/include/linux/nfsd
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-26 06:48:58 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-26 06:48:58 -0800
commitd0ea542aeffd0e0ef124a261f0d75ecd00b45c94 (patch)
tree2832a8ed02c5b3ad78223fa9e9016bd91621f8c6 /include/linux/nfsd
parente9361d5074be109631211cd8fed1e16a819fc762 (diff)
[PATCH] kNFSd: unlock-on-close fix
From: NeilBrown <neilb@cse.unsw.edu.au> add the bookeeping necessary to remove all locks held by an nfsv4 lockowner upon CLOSE, or upon state expiration. calls locks_remove_posix(). replace list_del_init() with list_del on nfsv4 state structures that are being reaped.
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r--include/linux/nfsd/state.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index 4fdd1d2e8c25..27febf82dfca 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -130,12 +130,15 @@ struct nfs4_replay {
* so_perfilestate: heads the list of nfs4_stateid (either open or lock)
* and is used to ensure no dangling nfs4_stateid references when we
* release a stateowner.
+* so_perlockowner: (open) nfs4_stateid->st_perlockowner entry - used when
+* close is called to reap associated byte-range locks
*/
struct nfs4_stateowner {
struct list_head so_idhash; /* hash by so_id */
struct list_head so_strhash; /* hash by op_name */
struct list_head so_perclient; /* nfs4_client->cl_perclient */
struct list_head so_perfilestate; /* list: nfs4_stateid */
+ struct list_head so_perlockowner; /* nfs4_stateid->st_perlockowner */
int so_is_open_owner; /* 1=openowner,0=lockowner */
u32 so_id;
struct nfs4_client * so_client;
@@ -166,6 +169,7 @@ struct nfs4_file {
* st_hash: stateid_hashtbl[] entry or lockstateid_hashtbl entry
* st_perfile: file_hashtbl[] entry.
* st_perfile_state: nfs4_stateowner->so_perfilestate
+* st_perlockowner: (open stateid) list of lock nfs4_stateowners
* st_share_access: used only for open stateid
* st_share_deny: used only for open stateid
*/
@@ -174,6 +178,7 @@ struct nfs4_stateid {
struct list_head st_hash;
struct list_head st_perfile;
struct list_head st_perfilestate;
+ struct list_head st_perlockowner;
struct nfs4_stateowner * st_stateowner;
struct nfs4_file * st_file;
stateid_t st_stateid;