]> err.no Git - linux-2.6/commit
[PATCH] nfsd4: reference count struct nfs4_file
authorNeilBrown <neilb@cse.unsw.edu.au>
Fri, 24 Jun 2005 05:03:10 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 07:06:30 +0000 (00:06 -0700)
commit13cd21845d6a9729ca95e36ae6e8c669623fbfd4
treed60064a17994393bfdc412cc1a85ffdf2a5f5914
parent8beefa249371f55432394ac96864c83b0b309c28
[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>
fs/nfsd/nfs4state.c
include/linux/nfsd/state.h