summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-03-09 16:45:14 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-09 16:45:14 -0800
commit4cdabcbee4cf9497b828359d434cdc1432d85d71 (patch)
tree6740e075e44cc4f44dc50bce33f3ff528c2687db
parent7372cfb817809e37d849ce7af8be4afcabd51b12 (diff)
[PATCH] nfsd4: Fix oops on nfsd4 shutdown
Fix Oops at nfsd shutdown. Reap any open nfs4_stateowners remaining on the close_lru hash list prior to reaping nfs4_clients at shutdown. Signed-off-by: Andy Adamson <andros@citi.umich.edu> 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>
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 06d4672205d1..dbd915afe72d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3238,8 +3238,15 @@ __nfs4_state_shutdown(void)
int i;
struct nfs4_client *clp = NULL;
struct nfs4_delegation *dp = NULL;
+ struct nfs4_stateowner *sop = NULL;
struct list_head *pos, *next;
+ list_for_each_safe(pos, next, &close_lru) {
+ sop = list_entry(pos, struct nfs4_stateowner, so_close_lru);
+ list_del(&sop->so_close_lru);
+ nfs4_put_stateowner(sop);
+ }
+
for (i = 0; i < CLIENT_HASH_SIZE; i++) {
while (!list_empty(&conf_id_hashtbl[i])) {
clp = list_entry(conf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);