aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-06-24 01:03:10 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:06:30 -0400
commit13cd21845d6a9729ca95e36ae6e8c669623fbfd4 (patch)
treed60064a17994393bfdc412cc1a85ffdf2a5f5914 /include/linux/nfsd
parent8beefa249371f55432394ac96864c83b0b309c28 (diff)
[PATCH] nfsd4: reference count struct nfs4_file
Add a struct kref to each nfs4_file and take a reference to it from each stateid and delegation that refers to it. The atomicity guarantees are overkill given that all this stuff is done under the single nfsd4 state lock, but a) we'd like finer-grained locking some day, and b) this simplifies the cleanup of the structures a bit, something that has previously been a bit complicated and bug-prone. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r--include/linux/nfsd/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index 2c3b42674a4c..296e6429fc3b 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -217,6 +217,7 @@ struct nfs4_stateowner {
217* share_acces, share_deny on the file. 217* share_acces, share_deny on the file.
218*/ 218*/
219struct nfs4_file { 219struct nfs4_file {
220 struct kref fi_ref;
220 struct list_head fi_hash; /* hash by "struct inode *" */ 221 struct list_head fi_hash; /* hash by "struct inode *" */
221 struct list_head fi_stateids; 222 struct list_head fi_stateids;
222 struct list_head fi_delegations; 223 struct list_head fi_delegations;