nfsd4: need to destroy revoked delegations in destroy_client
authorBenny Halevy <bhalevy@primarydata.com>
Tue, 29 Oct 2013 09:39:12 +0000 (11:39 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 29 Oct 2013 16:00:48 +0000 (12:00 -0400)
[use list_splice_init]
Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
[bfields: no need for recall_lock here]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index a90949aefe8021984cffd38fedcb309c3dba788b..21eb6788cb33f2bd909a776e256e9cf743a0a4e1 100644 (file)
@@ -1129,6 +1129,11 @@ destroy_client(struct nfs4_client *clp)
                dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
                destroy_delegation(dp);
        }
+       list_splice_init(&clp->cl_revoked, &reaplist);
+       while (!list_empty(&reaplist)) {
+               dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
+               destroy_revoked_delegation(dp);
+       }
        while (!list_empty(&clp->cl_openowners)) {
                oo = list_entry(clp->cl_openowners.next, struct nfs4_openowner, oo_perclient);
                release_openowner(oo);