Commit 1d590388 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: clear the recall_lru of delegations at shutdown

Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67dbf11e
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment