aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-01-04 05:52:38 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-04 05:52:38 -0800
commit1d59038871a8a172c6d4d6864196572d8d859ec4 (patch)
tree890d2b8d41c817bf44b6878db15e6dfb950175a6 /fs
parent67dbf11eff5140b186297fc8300c246d4dec7baf (diff)
downloadhistory-1d59038871a8a172c6d4d6864196572d8d859ec4.tar.gz
[PATCH] knfsd: clear the recall_lru of delegations at shutdown
Signed-off-by: Andy Adamson <andros@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 'fs')
-rw-r--r--fs/nfsd/nfs4state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 51526f9d00d88c..ca5b440d715fd7 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3208,6 +3208,8 @@ __nfs4_state_shutdown(void)
{
int i;
struct nfs4_client *clp = NULL;
+ struct nfs4_delegation *dp = NULL;
+ struct list_head *pos, *next;
for (i = 0; i < CLIENT_HASH_SIZE; i++) {
while (!list_empty(&conf_id_hashtbl[i])) {
@@ -3219,6 +3221,14 @@ __nfs4_state_shutdown(void)
expire_client(clp);
}
}
+ spin_lock(&recall_lock);
+ list_for_each_safe(pos, next, &del_recall_lru) {
+ dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
+ atomic_set(&dp->dl_state, NFS4_RECALL_COMPLETE);
+ release_delegation(dp);
+ }
+ spin_unlock(&recall_lock);
+
release_all_files();
cancel_delayed_work(&laundromat_work);
flush_scheduled_work();